mlton: clean up after x86_64-darwin drop
This commit is contained in:
@@ -29,11 +29,6 @@ stdenv.mkDerivation rec {
|
||||
url = "mirror://sourceforge/project/mlton/mlton/${version}/${pname}-${version}-1.amd64-linux.tgz";
|
||||
hash = "sha256-9vkSAJsJRrc6+I/18+cTtr5juHFpbiaXzPFWS1bn0Ds=";
|
||||
})
|
||||
else if stdenv.hostPlatform.system == "x86_64-darwin" then
|
||||
(fetchurl {
|
||||
url = "mirror://sourceforge/project/mlton/mlton/${version}/${pname}-${version}-1.amd64-darwin.gmp-macports.tgz";
|
||||
hash = "sha256-qb//O8Wnk+hDBvmM1g8ZWoE5kCkA+W4QctE8CBO0nBA=";
|
||||
})
|
||||
else
|
||||
throw "Architecture not supported";
|
||||
|
||||
@@ -76,9 +71,6 @@ stdenv.mkDerivation rec {
|
||||
''
|
||||
+ lib.optionalString stdenv.cc.isClang ''
|
||||
sed -i "s_ patch -s -p0 <gdtoa.hide-public-fns.patch_ patch -s -p0 <gdtoa.hide-public-fns.patch\n\tsed -i 's|printf(emptyfmt|printf(\"\"|g' ./gdtoa/arithchk.c_" ./runtime/Makefile
|
||||
''
|
||||
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||
sed -i 's|XCFLAGS += -I/usr/local/include -I/sw/include -I/opt/local/include||' ./runtime/Makefile
|
||||
'';
|
||||
|
||||
preBuild = ''
|
||||
@@ -93,19 +85,11 @@ stdenv.mkDerivation rec {
|
||||
# So the builder runs the binary compiler with gmp.
|
||||
export LD_LIBRARY_PATH=${gmp.out}/lib''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH
|
||||
|
||||
''
|
||||
+ lib.optionalString stdenv.hostPlatform.isLinux ''
|
||||
# Patch ELF interpreter.
|
||||
patchelf --set-interpreter ${dynamic_linker} $(pwd)/../${usr_prefix}/lib/mlton/mlton-compile
|
||||
for e in mllex mlyacc ; do
|
||||
patchelf --set-interpreter ${dynamic_linker} $(pwd)/../${usr_prefix}/bin/$e
|
||||
done
|
||||
''
|
||||
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||
# Patch libgmp linking
|
||||
install_name_tool -change /opt/local/lib/libgmp.10.dylib ${gmp}/lib/libgmp.10.dylib $(pwd)/../${usr_prefix}/lib/mlton/mlton-compile
|
||||
install_name_tool -change /opt/local/lib/libgmp.10.dylib ${gmp}/lib/libgmp.10.dylib $(pwd)/../${usr_prefix}/bin/mlyacc
|
||||
install_name_tool -change /opt/local/lib/libgmp.10.dylib ${gmp}/lib/libgmp.10.dylib $(pwd)/../${usr_prefix}/bin/mllex
|
||||
'';
|
||||
|
||||
doCheck = true;
|
||||
|
||||
@@ -18,11 +18,6 @@ stdenv.mkDerivation rec {
|
||||
url = "https://github.com/MLton/mlton/releases/download/on-${version}-release/${pname}-${version}-1.amd64-linux.tgz";
|
||||
hash = "sha256-jkq9ufPvgcAbmJpmc03KKn9BicVWc6HIu61U58spmDg=";
|
||||
})
|
||||
else if stdenv.hostPlatform.system == "x86_64-darwin" then
|
||||
(fetchurl {
|
||||
url = "https://github.com/MLton/mlton/releases/download/on-${version}-release/${pname}-${version}-1.amd64-darwin.gmp-static.tgz";
|
||||
hash = "sha256-uy2YLvl9bvTv4HjSOgm68+Uvb9bI8aYAFuFiRDj0h7M=";
|
||||
})
|
||||
else
|
||||
throw "Architecture not supported";
|
||||
|
||||
@@ -40,29 +35,15 @@ stdenv.mkDerivation rec {
|
||||
make install PREFIX=$out
|
||||
'';
|
||||
|
||||
postFixup =
|
||||
lib.optionalString stdenv.hostPlatform.isLinux ''
|
||||
patchelf --set-interpreter ${dynamic-linker} $out/lib/mlton/mlton-compile
|
||||
patchelf --set-rpath ${gmp}/lib $out/lib/mlton/mlton-compile
|
||||
postFixup = ''
|
||||
patchelf --set-interpreter ${dynamic-linker} $out/lib/mlton/mlton-compile
|
||||
patchelf --set-rpath ${gmp}/lib $out/lib/mlton/mlton-compile
|
||||
|
||||
for e in mllex mlnlffigen mlprof mlyacc; do
|
||||
patchelf --set-interpreter ${dynamic-linker} $out/bin/$e
|
||||
patchelf --set-rpath ${gmp}/lib $out/bin/$e
|
||||
done
|
||||
''
|
||||
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||
install_name_tool -change \
|
||||
/opt/local/lib/libgmp.10.dylib \
|
||||
${gmp}/lib/libgmp.10.dylib \
|
||||
$out/lib/mlton/mlton-compile
|
||||
|
||||
for e in mllex mlnlffigen mlprof mlyacc; do
|
||||
install_name_tool -change \
|
||||
/opt/local/lib/libgmp.10.dylib \
|
||||
${gmp}/lib/libgmp.10.dylib \
|
||||
$out/bin/$e
|
||||
done
|
||||
'';
|
||||
for e in mllex mlnlffigen mlprof mlyacc; do
|
||||
patchelf --set-interpreter ${dynamic-linker} $out/bin/$e
|
||||
patchelf --set-rpath ${gmp}/lib $out/bin/$e
|
||||
done
|
||||
'';
|
||||
|
||||
meta = import ./meta.nix { inherit lib; };
|
||||
}
|
||||
|
||||
@@ -20,11 +20,6 @@ stdenv.mkDerivation rec {
|
||||
url = "https://github.com/MLton/mlton/releases/download/on-${version}-release/${pname}-${version}-1.amd64-linux-glibc2.31.tgz";
|
||||
hash = "sha256-dJy1nWuszWRBQ3Cb6GYQUijSttzUDFB6kLicm14PRdI=";
|
||||
})
|
||||
else if stdenv.hostPlatform.system == "x86_64-darwin" then
|
||||
(fetchurl {
|
||||
url = "https://github.com/MLton/mlton/releases/download/on-${version}-release/${pname}-${version}-1.amd64-darwin-19.6.gmp-static.tgz";
|
||||
hash = "sha256-W+qfYBNupoR4kMX05F1xJqMu8U/UaiMDyrh1ypXIzXY=";
|
||||
})
|
||||
else if stdenv.hostPlatform.system == "aarch64-darwin" then
|
||||
(fetchurl {
|
||||
url = "https://projects.laas.fr/tina/software/mlton-${version}-1.arm64-darwin-21.6-gmp-static.tgz";
|
||||
|
||||
@@ -24,11 +24,6 @@ stdenv.mkDerivation rec {
|
||||
url = "https://github.com/MLton/mlton/releases/download/on-${version}-release/${pname}-${version}-1.arm64-linux.ubuntu-24.04-arm_glibc2.39.tgz";
|
||||
hash = "sha256-rn65t253SfUShAM3kXiLQJHT7JS7EO3fAPB23LWIwfc=";
|
||||
})
|
||||
else if stdenv.hostPlatform.system == "x86_64-darwin" then
|
||||
(fetchurl {
|
||||
url = "https://github.com/MLton/mlton/releases/download/on-${version}-release/${pname}-${version}-1.amd64-darwin.macos-13_gmp-static.tgz";
|
||||
hash = "sha256-fW0hqjrWUcy+PIN8WHb1r4EYgfuwF9Zz3q7f2ZtxOi0=";
|
||||
})
|
||||
else if stdenv.hostPlatform.system == "aarch64-darwin" then
|
||||
(fetchurl {
|
||||
url = "https://github.com/MLton/mlton/releases/download/on-${version}-release/${pname}-${version}-1.arm64-darwin.macos-15_gmp-static.tgz";
|
||||
|
||||
@@ -29,7 +29,7 @@ rec {
|
||||
rev = "on-20241230-release";
|
||||
hash = "sha256-gJUzav2xH8C4Vy5FuqN73Z6lPMSPQgJApF8LgsJXRWo=";
|
||||
# https://github.com/MLton/mlton/issues/631
|
||||
doCheck = !(stdenv.hostPlatform.isAarch64 && stdenv.hostPlatform.isDarwin);
|
||||
doCheck = !stdenv.hostPlatform.isDarwin;
|
||||
};
|
||||
|
||||
mltonHEAD = callPackage ./from-git-source.nix {
|
||||
@@ -38,6 +38,6 @@ rec {
|
||||
rev = "61baac7108fbd91413f0537b7a42d9a1023455f4";
|
||||
hash = "sha256-nWR7ZaXfKxeXfZ9IHipAQ39ASVtva4BeDHP3Zq8mqPo=";
|
||||
# https://github.com/MLton/mlton/issues/631
|
||||
doCheck = !(stdenv.hostPlatform.isAarch64 && stdenv.hostPlatform.isDarwin);
|
||||
doCheck = !stdenv.hostPlatform.isDarwin;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user