1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-13 16:15:30 +00:00
nixpkgs/pkgs/development/compilers/mlton/from-git-source.nix
Sophia Donataccio fd9a07c7d4 mlton: add one-liner from old derivation to fix source files
Updates from-git-source.nix to use the one-liner to fix up the bash
shebang lines.
2018-10-12 00:36:07 -04:00

36 lines
621 B
Nix

{ 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 = ''
find . -type f | grep -v -e '\.tgz''$' | xargs sed -i "s@/usr/bin/env bash@$(type -p bash)@"
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;
}