2018-10-12 06:30:48 +02:00
|
|
|
{ fetchgit
|
|
|
|
, gmp
|
|
|
|
, mltonBootstrap
|
|
|
|
, url ? "https://github.com/mlton/mlton"
|
|
|
|
, rev
|
|
|
|
, sha256
|
|
|
|
, stdenv
|
|
|
|
, version
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2019-08-13 23:52:01 +02:00
|
|
|
pname = "mlton";
|
|
|
|
inherit version;
|
2018-10-12 06:30:48 +02:00
|
|
|
|
|
|
|
src = fetchgit {
|
|
|
|
inherit url rev sha256;
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [mltonBootstrap gmp];
|
|
|
|
|
|
|
|
preBuild = ''
|
2018-10-12 06:36:07 +02:00
|
|
|
find . -type f | grep -v -e '\.tgz''$' | xargs sed -i "s@/usr/bin/env bash@$(type -p bash)@"
|
|
|
|
|
2018-10-12 06:30:48 +02:00
|
|
|
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;
|
|
|
|
}
|