aboutsummaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix45
1 files changed, 45 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix
new file mode 100644
index 0000000..952ae3f
--- /dev/null
+++ b/flake.nix
@@ -0,0 +1,45 @@
+# SPDX-FileCopyrightText: 2021 Serokell <https://serokell.io/>
+#
+# SPDX-License-Identifier: CC0-1.0
+
+{
+ description = "My haskell application";
+
+ inputs = {
+ nixpkgs.url = "github:NixOS/nixpkgs";
+ flake-utils.url = "github:numtide/flake-utils";
+ };
+
+ outputs = { self, nixpkgs, flake-utils }:
+ flake-utils.lib.eachDefaultSystem (system:
+ let
+ pkgs = nixpkgs.legacyPackages.${system};
+
+ haskellPackages = pkgs.haskellPackages;
+
+ jailbreakUnbreak = pkg:
+ pkgs.haskell.lib.doJailbreak (pkg.overrideAttrs (_: { meta = { }; }));
+
+ packageName = "dybiec-info";
+ in
+ {
+ packages.${packageName} =
+ haskellPackages.callCabal2nix packageName self rec {
+
+ # Dependency overrides go here
+ };
+
+ packages.default = self.packages.${system}.${packageName};
+ defaultPackage = self.packages.${system}.default;
+
+ devShells.default = pkgs.mkShell {
+ buildInputs = with pkgs; [
+ haskellPackages.haskell-language-server # you must build it with your ghc to work
+ ghcid
+ cabal-install
+ ];
+ inputsFrom = map (__getAttr "env") (__attrValues self.packages.${system});
+ };
+ devShell = self.devShells.${system}.default;
+ });
+}