diff options
Diffstat (limited to 'stack.nix')
| -rw-r--r-- | stack.nix | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/stack.nix b/stack.nix new file mode 100644 index 0000000..98b31c1 --- /dev/null +++ b/stack.nix | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | { ghc, nixpkgs ? (import <nixos> {}) }: | ||
| 2 | |||
| 3 | let | ||
| 4 | inherit (nixpkgs) haskell pkgs; | ||
| 5 | haskellPackages = if ghc.version == pkgs.haskellPackages.ghc.version then pkgs.haskellPackages else pkgs.haskell.packages."ghc${builtins.replaceStrings ["."] [""] ghc.version}"; | ||
| 6 | in haskell.lib.buildStackProject { | ||
| 7 | inherit ghc; | ||
| 8 | name = "stackenv"; | ||
| 9 | buildInputs = (with pkgs; | ||
| 10 | [ postgresql zlib | ||
| 11 | ]) ++ (with haskellPackages; | ||
| 12 | [ yesod-bin | ||
| 13 | ]); | ||
| 14 | } | ||
