mlton: enable aarch64-darwin (#302487)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
{ lib, stdenv, fetchurl, patchelf, gmp }:
|
||||
{ lib, stdenv, fetchpatch, fetchurl, patchelf, gmp }:
|
||||
let
|
||||
dynamic-linker = stdenv.cc.bintools.dynamicLinker;
|
||||
in
|
||||
@@ -9,17 +9,31 @@ stdenv.mkDerivation rec {
|
||||
src =
|
||||
if stdenv.hostPlatform.system == "x86_64-linux" then
|
||||
(fetchurl {
|
||||
url = "https://github.com/MLton/mlton/releases/download/on-${version}-release/${pname}-${version}-1.amd64-linux-glibc2.31.tgz.tgz";
|
||||
sha256 = "0f4q575yfm5dpg4a2wsnqn4l2zrar96p6rlsk0dw10ggyfwvsjlf";
|
||||
url = "https://github.com/MLton/mlton/releases/download/on-${version}-release/${pname}-${version}-1.amd64-linux-glibc2.31.tgz";
|
||||
sha256 = "1lj51xg9p75qj1x5036lvjvd4a2j21kfi6vh8d0n9kdcdffvb73l";
|
||||
})
|
||||
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";
|
||||
sha256 = "1cw7yhw48qp12q0adwf8srpjzrgkp84kmlkqw3pz8vkxz4p9hbdv";
|
||||
sha256 = "0xndr2awlxdqr81j6snl9zqjx8r6f5fy9x65j1w899kf2dh9zsjv";
|
||||
})
|
||||
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";
|
||||
sha256 = "1s61ayk3yj2xw8ilqk3fhb03x5x1wcakkmbhhvcsfb2hdw2c932x";
|
||||
})
|
||||
else
|
||||
throw "Architecture not supported";
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
name = "remove-duplicate-if.patch";
|
||||
url = "https://github.com/MLton/mlton/commit/22002cd0a53a1ab84491d74cb8dc6a4e50c1f7b7.patch";
|
||||
decode = "sed -e 's|Makefile\.binary|Makefile|g'";
|
||||
hash = "sha256-Gtmc+OIh+m7ordSn74fpOKVDQDtYyLHe6Le2snNCBYQ=";
|
||||
})
|
||||
];
|
||||
|
||||
buildInputs = [ gmp ];
|
||||
nativeBuildInputs = lib.optional stdenv.hostPlatform.isLinux patchelf;
|
||||
|
||||
|
||||
@@ -15,14 +15,14 @@ rec {
|
||||
mlton20210117Binary = callPackage ./20210117-binary.nix { };
|
||||
|
||||
mlton20210117 = callPackage ./from-git-source.nix {
|
||||
mltonBootstrap = mlton20180207Binary;
|
||||
mltonBootstrap = mlton20210117Binary;
|
||||
version = "20210117";
|
||||
rev = "on-20210117-release";
|
||||
sha256 = "sha256-rqL8lnzVVR+5Hc7sWXK8dCXN92dU76qSoii3/4StODM=";
|
||||
};
|
||||
|
||||
mltonHEAD = callPackage ./from-git-source.nix {
|
||||
mltonBootstrap = mlton20180207Binary;
|
||||
mltonBootstrap = mlton20210117Binary;
|
||||
version = "HEAD";
|
||||
rev = "875f7912a0b135a9a7e86a04ecac9cacf0bfe5e5";
|
||||
sha256 = "sha256-/MIoVqqv8qrJPehU7VRFpXtAAo8UUzE3waEvB7WnS9A=";
|
||||
|
||||
@@ -11,5 +11,5 @@
|
||||
|
||||
homepage = "http://mlton.org/";
|
||||
license = "bsd";
|
||||
platforms = [ "i686-linux" "x86_64-linux" "x86_64-darwin"];
|
||||
platforms = [ "i686-linux" "x86_64-linux" "x86_64-darwin" "aarch64-darwin"];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user