depot/third_party/nixpkgs/pkgs/development/tools/haskell/mueval/default.nix
Default email fa5436e0a7 Project import generated by Copybara.
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
2024-06-05 17:53:02 +02:00

34 lines
794 B
Nix

{ lib, 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);
in stdenv.mkDerivation {
name = "mueval-env";
inherit (haskellPackages) mueval;
nativeBuildInputs = [ makeWrapper ];
dontUnpack = true;
buildPhase = ''
runHook preBuild
mkdir -p $out/bin
makeWrapper $mueval/bin/mueval $out/bin/mueval \
--set "NIX_GHC_LIBDIR" "$(${lib.getExe' env "ghc"} --print-libdir)"
runHook postBuild
'';
passthru = { inherit defaultPkgs; };
meta.mainProgram = "mueval";
}