depot/third_party/nixpkgs/pkgs/development/tools/haskell/mueval/default.nix
Default email 8ac5e011d6 Project import generated by Copybara.
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
2020-04-24 19:36:52 -04:00

32 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; };
}