diff --git a/shell.nix b/shell.nix index 1274430f9..3c37a979e 100644 --- a/shell.nix +++ b/shell.nix @@ -1,11 +1,11 @@ -{ nixpkgs ? import {}, compiler ? "ghc822" }: +{ nixpkgs ? import {}, compiler ? null }: let inherit (nixpkgs) pkgs; haskellPackages = if isNull compiler then pkgs.haskellPackages - else pkgs.haskell.packages.${compiler}; + else pkgs.haskell.packages."${compiler}"; drv = haskellPackages.callPackage ./uniworx.nix {}; diff --git a/stack.nix b/stack.nix index 720dc860f..93d072683 100644 --- a/stack.nix +++ b/stack.nix @@ -2,12 +2,13 @@ let inherit (nixpkgs) haskell pkgs; + haskellPackages = if ghc.version == pkgs.haskellPackages.ghc.version then pkgs.haskellPackages else pkgs.haskell.packages."ghc${builtins.replaceStrings ["."] [""] ghc.version}"; in haskell.lib.buildStackProject { inherit ghc; name = "stackenv"; buildInputs = (with pkgs; [ postgresql zlib openldap cyrus_sasl.dev - ]) ++ (with haskell.packages."ghc${builtins.replaceStrings ["."] [""] ghc.version}"; + ]) ++ (with haskellPackages; [ yesod-bin ]); }