summary refs log tree commit diff
path: root/pkgs/development/compilers/purescript/purescript
diff options
context:
space:
mode:
authorTom Cumming <mail@tomcumming.co.uk>2023-05-15 23:33:36 +0100
committerTom Cumming <mail@tomcumming.co.uk>2023-05-17 17:23:52 +0100
commit5907564df065fd0e63cd0b6070a48fa9829ed0b3 (patch)
tree6365978d09abcbbce3dbeecbc08f1e18420dcba9 /pkgs/development/compilers/purescript/purescript
parent89fad28e1f8dc011b5a4222157027b4e8784845c (diff)
downloadnixpkgs-5907564df065fd0e63cd0b6070a48fa9829ed0b3.tar
nixpkgs-5907564df065fd0e63cd0b6070a48fa9829ed0b3.tar.gz
nixpkgs-5907564df065fd0e63cd0b6070a48fa9829ed0b3.tar.bz2
nixpkgs-5907564df065fd0e63cd0b6070a48fa9829ed0b3.tar.lz
nixpkgs-5907564df065fd0e63cd0b6070a48fa9829ed0b3.tar.xz
nixpkgs-5907564df065fd0e63cd0b6070a48fa9829ed0b3.tar.zst
nixpkgs-5907564df065fd0e63cd0b6070a48fa9829ed0b3.zip
purescript: Add aarch64-darwin target
Diffstat (limited to 'pkgs/development/compilers/purescript/purescript')
-rw-r--r--pkgs/development/compilers/purescript/purescript/default.nix17
-rwxr-xr-xpkgs/development/compilers/purescript/purescript/update.sh5
2 files changed, 17 insertions, 5 deletions
diff --git a/pkgs/development/compilers/purescript/purescript/default.nix b/pkgs/development/compilers/purescript/purescript/default.nix
index 2e0eb9534f4..d7c8394a57b 100644
--- a/pkgs/development/compilers/purescript/purescript/default.nix
+++ b/pkgs/development/compilers/purescript/purescript/default.nix
@@ -24,10 +24,17 @@ in stdenv.mkDerivation rec {
   src =
     if stdenv.isDarwin
     then
-    fetchurl {
-      url = "https://github.com/${pname}/${pname}/releases/download/v${version}/macos.tar.gz";
-      sha256 = "1xxg79rlf7li9f73wdbwif1dyy4hnzpypy6wx4zbnvap53habq9f";
-    }
+      (if stdenv.isAarch64
+      then
+      fetchurl {
+        url = "https://github.com/${pname}/${pname}/releases/download/v${version}/macos-arm64.tar.gz";
+        sha256 = "16ci26pgrw0zmnyn1zj129y9624cqwzrhqglc8mgfg4k7rxvqy2a";
+      }
+      else
+      fetchurl {
+        url = "https://123.github.com/${pname}/${pname}/releases/download/v${version}/macos.tar.gz";
+        sha256 = "1xxg79rlf7li9f73wdbwif1dyy4hnzpypy6wx4zbnvap53habq9f";
+      })
     else
     fetchurl {
       url = "https://github.com/${pname}/${pname}/releases/download/v${version}/linux64.tar.gz";
@@ -63,7 +70,7 @@ in stdenv.mkDerivation rec {
     license = licenses.bsd3;
     sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
     maintainers = with maintainers; [ justinwoo mbbx6spp cdepillabout ];
-    platforms = [ "x86_64-linux" "x86_64-darwin" ];
+    platforms = [ "x86_64-linux" "x86_64-darwin" "aarch64-darwin" ];
     mainProgram = "purs";
     changelog = "https://github.com/purescript/purescript/releases/tag/v${version}";
   };
diff --git a/pkgs/development/compilers/purescript/purescript/update.sh b/pkgs/development/compilers/purescript/purescript/update.sh
index 1dfb4607aff..259fb8aa561 100755
--- a/pkgs/development/compilers/purescript/purescript/update.sh
+++ b/pkgs/development/compilers/purescript/purescript/update.sh
@@ -29,11 +29,16 @@ old_darwin_version_hash="$(nix-prefetch-url "https://github.com/purescript/pures
 echo "v${old_version} darwin tarball hash (current version): $old_darwin_version_hash"
 new_darwin_version_hash="$(nix-prefetch-url "https://github.com/purescript/purescript/releases/download/v${new_version}/macos.tar.gz")"
 echo "v${new_version} darwin tarball hash: $new_darwin_version_hash"
+old_darwin_arm_version_hash="$(nix-prefetch-url "https://github.com/purescript/purescript/releases/download/v${old_version}/macos-arm64.tar.gz")"
+echo "v${old_version} darwin arm tarball hash (current version): $old_darwin_arm_version_hash"
+new_darwin_arm_version_hash="$(nix-prefetch-url "https://github.com/purescript/purescript/releases/download/v${new_version}/macos-arm64.tar.gz")"
+echo "v${new_version} darwin arm tarball hash: $new_darwin_arm_version_hash"
 echo
 
 echo "Replacing version and hashes in ${purescript_derivation_file}."
 sed -i -e "s/${old_linux_version_hash}/${new_linux_version_hash}/" "$purescript_derivation_file"
 sed -i -e "s/${old_darwin_version_hash}/${new_darwin_version_hash}/" "$purescript_derivation_file"
+sed -i -e "s/${old_darwin_arm_version_hash}/${new_darwin_arm_version_hash}/" "$purescript_derivation_file"
 sed -i -e "s/${old_version}/${new_version}/" "$purescript_derivation_file"
 echo