diff options
Diffstat (limited to 'pkgs/development/compilers/mlton/from-git-source.nix')
-rw-r--r-- | pkgs/development/compilers/mlton/from-git-source.nix | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/pkgs/development/compilers/mlton/from-git-source.nix b/pkgs/development/compilers/mlton/from-git-source.nix new file mode 100644 index 000000000000..6678335b4b9c --- /dev/null +++ b/pkgs/development/compilers/mlton/from-git-source.nix @@ -0,0 +1,33 @@ +{ fetchgit +, gmp +, mltonBootstrap +, url ? "https://github.com/mlton/mlton" +, rev +, sha256 +, stdenv +, version +}: + +stdenv.mkDerivation { + name = "mlton-${version}"; + + src = fetchgit { + inherit url rev sha256; + }; + + buildInputs = [mltonBootstrap gmp]; + + preBuild = '' + makeFlagsArray=( + MLTON_VERSION="${version} ${rev}" + CC="$(type -p cc)" + PREFIX="$out" + WITH_GMP_INC_DIR="${gmp.dev}/include" + WITH_GMP_LIB_DIR="${gmp}/lib" + ) + ''; + + doCheck = true; + + meta = import ./meta.nix; +} |