mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 22:20:51 +00:00
33 lines
801 B
Nix
33 lines
801 B
Nix
{ stdenv, makeWrapper, haskellPackages, packages ? (pkgs: [])
|
|
}:
|
|
|
|
let defaultPkgs = pkgs: [ pkgs.show
|
|
pkgs.simple-reflect
|
|
pkgs.QuickCheck
|
|
pkgs.mtl
|
|
];
|
|
env = haskellPackages.ghcWithPackages
|
|
(pkgs: defaultPkgs pkgs ++ packages pkgs);
|
|
libDir = "${env}/lib/ghc-${env.version}";
|
|
|
|
in stdenv.mkDerivation {
|
|
name = "mueval-env";
|
|
|
|
inherit (haskellPackages) mueval;
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
buildCommand = ''
|
|
mkdir -p $out/bin
|
|
|
|
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; };
|
|
}
|