2015-09-08 15:17:09 +01:00
|
|
|
{ stdenv, makeWrapper, haskellPackages, packages ? (pkgs: [])
|
2015-04-16 11:01:39 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
let defaultPkgs = pkgs: [ pkgs.show
|
|
|
|
pkgs.simple-reflect
|
|
|
|
pkgs.QuickCheck
|
|
|
|
pkgs.mtl
|
|
|
|
];
|
2015-09-08 15:17:09 +01:00
|
|
|
env = haskellPackages.ghcWithPackages
|
2015-04-16 11:01:39 +01:00
|
|
|
(pkgs: defaultPkgs pkgs ++ packages pkgs);
|
|
|
|
libDir = "${env}/lib/ghc-${env.version}";
|
|
|
|
|
|
|
|
in stdenv.mkDerivation {
|
|
|
|
name = "mueval-env";
|
|
|
|
|
2015-09-08 15:17:09 +01:00
|
|
|
inherit (haskellPackages) mueval;
|
2015-04-16 11:01:39 +01:00
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
buildCommand = ''
|
|
|
|
mkdir -p $out/bin
|
2015-04-16 13:02:40 +01:00
|
|
|
|
2015-04-16 11:01:39 +01:00
|
|
|
makeWrapper $mueval/bin/mueval $out/bin/mueval \
|
|
|
|
--prefix PATH ":" "$out/bin"
|
|
|
|
|
|
|
|
makeWrapper $mueval/bin/mueval-core $out/bin/mueval \
|
|
|
|
--set "NIX_GHC_LIBDIR" "${libDir}"
|
|
|
|
|
|
|
|
'';
|
|
|
|
|
|
|
|
passthru = { inherit defaultPkgs; };
|
|
|
|
}
|