zed-editor: 0.172.9 -> 0.172.10 (#380188)
[NixPkgs.git] / pkgs / development / compilers / mlton / from-git-source.nix
blob922ff25c77a2d4d2cbd22762996c43c2b165e18a
2   fetchgit,
3   gmp,
4   mltonBootstrap,
5   url ? "https://github.com/mlton/mlton",
6   rev,
7   sha256,
8   stdenv,
9   version,
10   which,
13 stdenv.mkDerivation {
14   pname = "mlton";
15   inherit version;
17   src = fetchgit {
18     inherit url rev sha256;
19   };
21   nativeBuildInputs = [
22     which
23     mltonBootstrap
24   ];
26   buildInputs = [ gmp ];
28   strictDeps = true;
30   # build fails otherwise
31   enableParallelBuilding = false;
33   preBuild = ''
34     find . -type f | grep -v -e '\.tgz''$' | xargs sed -i "s@/usr/bin/env bash@$(type -p bash)@"
35     sed -i "s|/tmp|$TMPDIR|" bin/regression
37     makeFlagsArray=(
38       MLTON_VERSION="${version} ${rev}"
39       CC="$(type -p cc)"
40       PREFIX="$out"
41       WITH_GMP_INC_DIR="${gmp.dev}/include"
42       WITH_GMP_LIB_DIR="${gmp}/lib"
43       )
44   '';
46   doCheck = true;
48   meta = import ./meta.nix;