haskell-generic-builder: add a helpful message that explains why it makes no sense to build an 'env' attribute

This commit is contained in:
Peter Simons 2015-01-11 11:37:49 +01:00
parent efbe928ac3
commit dbb4012fdc
1 changed files with 6 additions and 0 deletions

View File

@ -215,6 +215,12 @@ stdenv.mkDerivation ({
name = "interactive-${optionalString hasActiveLibrary "haskell-"}${pname}-${version}-environment";
nativeBuildInputs = [ (ghc.withPackages (p: haskellBuildInputs)) systemBuildInputs ];
shellHook = "eval $(grep export $(type -p ghc))";
buildCommand = ''
echo >&2 ""
echo >&2 "*** Haskell 'env' attributes are intended for interactive nix-shell sessions, not for building! ***"
echo >&2 ""
exit 1
'';
};
};