diff options
author | Winter <winter@winter.cafe> | 2022-01-09 16:43:20 -0500 |
---|---|---|
committer | tomberek <tomberek@users.noreply.github.com> | 2022-02-03 02:08:51 -0500 |
commit | 37e39b389795ea9456ff60f6934f14bb61ff754d (patch) | |
tree | 3bf14634c85db5329dbeda121382bb60db022444 /pkgs | |
parent | 7acca6575875b60e7bd0ab4a1fd6bbc099522f56 (diff) |
crystal_1_2: add support for aarch64-darwin
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/development/compilers/crystal/default.nix | 16 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 2 |
2 files changed, 15 insertions, 3 deletions
diff --git a/pkgs/development/compilers/crystal/default.nix b/pkgs/development/compilers/crystal/default.nix index 330cf851ab1ba..705ba157ec5e1 100644 --- a/pkgs/development/compilers/crystal/default.nix +++ b/pkgs/development/compilers/crystal/default.nix @@ -32,9 +32,11 @@ let x86_64-linux = "linux-x86_64"; i686-linux = "linux-i686"; x86_64-darwin = "darwin-x86_64"; + aarch64-darwin = "darwin-universal"; }; arch = archs.${stdenv.system} or (throw "system ${stdenv.system} not supported"); + isAarch64Darwin = stdenv.system == "aarch64-darwin"; checkInputs = [ git gmp openssl readline libxml2 libyaml ]; @@ -53,6 +55,8 @@ let tar --strip-components=1 -C $out -xf ${src} patchShebangs $out/bin/crystal ''; + + meta.broken = lib.versionOlder version "1.2.0" && isAarch64Darwin; }; commonBuildInputs = extraBuildInputs: [ @@ -206,7 +210,8 @@ let homepage = "https://crystal-lang.org/"; license = licenses.asl20; maintainers = with maintainers; [ david50407 fabianhjr manveru peterhoeg ]; - platforms = builtins.attrNames archs; + platforms = let archNames = builtins.attrNames archs; in + if (lib.versionOlder version "1.2.0") then remove "aarch64-darwin" archNames else archNames; broken = lib.versionOlder version "0.36.1" && stdenv.isDarwin; }; }) @@ -223,6 +228,13 @@ rec { }; }; + binaryCrystal_1_2 = genericBinary { + version = "1.2.0"; + sha256s = { + aarch64-darwin = "1hrs8cpjxdkcf8mr9qgzilwbg6bakq87sd4yydfsk2f4pqd6g7nf"; + }; + }; + crystal_1_0 = generic { version = "1.0.0"; sha256 = "sha256-RI+a3w6Rr+uc5jRf7xw0tOenR+q6qii/ewWfID6dbQ8="; @@ -238,7 +250,7 @@ rec { crystal_1_2 = generic { version = "1.2.2"; sha256 = "sha256-nyOXhsutVBRdtJlJHe2dALl//BUXD1JeeQPgHU4SwiU="; - binary = crystal_1_1; + binary = if isAarch64Darwin then binaryCrystal_1_2 else crystal_1_1; }; crystal = crystal_1_2; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7c45b47fda39a..c019e5ac631d7 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -11900,7 +11900,7 @@ with pkgs; copper = callPackage ../development/compilers/copper {}; inherit (callPackages ../development/compilers/crystal { - llvmPackages = llvmPackages_10; + llvmPackages = if stdenv.system == "aarch64-darwin" then llvmPackages_11 else llvmPackages_10; }) crystal_1_0 crystal_1_1 |