Fix build on Nix

This commit is contained in:
Gregor Kleen 2018-01-30 15:09:44 +01:00
parent 7536af9bdc
commit 3c12f0bb31
2 changed files with 13 additions and 6 deletions

View File

@ -1,4 +1,4 @@
{ nixpkgs ? import <nixpkgs> {}, compiler ? null }:
{ nixpkgs ? import <nixpkgs> {}, compiler ? "ghc802" }:
let
inherit (nixpkgs) pkgs;
@ -22,7 +22,7 @@ let
'';
override = oldAttrs: {
nativeBuildInputs = oldAttrs.nativeBuildInputs ++ (with pkgs; [ postgresql ]) ++ (with haskellPackages; [ stack stack-run yesod-bin ]);
nativeBuildInputs = oldAttrs.nativeBuildInputs ++ (with pkgs; [ postgresql ]) ++ (with haskellPackages; [ stack yesod-bin ]);
shellHook = ''
${oldAttrs.shellHook}
export PROMPT_INFO="${oldAttrs.name}"
@ -44,5 +44,10 @@ let
exit ''${ret}
'';
};
in
pkgs.stdenv.lib.overrideDerivation drv.env override
dummy = pkgs.stdenv.mkDerivation {
name = "interactive-uniworx-environment";
shellHook = "";
};
in pkgs.stdenv.lib.overrideDerivation dummy override
#pkgs.stdenv.lib.overrideDerivation drv.env override

View File

@ -5,7 +5,9 @@ let
in haskell.lib.buildStackProject {
inherit ghc;
name = "stackenv";
buildInputs = with pkgs;
buildInputs = (with pkgs;
[ postgresql zlib openldap cyrus_sasl.dev
];
]) ++ (with haskell.packages."ghc${builtins.replaceStrings ["."] [""] ghc.version}";
[ yesod-bin
]);
}