nixpkgs/pkgs/development/compilers/mlton/from-git-source.nix

34 lines
523 B
Nix
Raw Normal View History

2018-10-12 06:30:48 +02:00
{ 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;
}