depot/third_party/nixpkgs/pkgs/development/tools/haskell/mueval/default.nix
Default email e7ec2969af Project import generated by Copybara.
GitOrigin-RevId: 9b19f5e77dd906cb52dade0b7bd280339d2a1f3d
2024-01-13 09:15:51 +01:00

28 lines
706 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 \
--set "NIX_GHC_LIBDIR" "${libDir}"
'';
passthru = { inherit defaultPkgs; };
}