Skip to content

Commit 5dcea83

Browse files
authored
Merge pull request #230 from jmatsushita/master
Upgrade to purs 0.15.10 and provide aarch64-darwin builds
2 parents dc7208e + 6f89295 commit 5dcea83

File tree

3 files changed

+37
-7
lines changed

3 files changed

+37
-7
lines changed

default.nix

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ let
66
};
77

88
inputs = rec {
9+
purs-0_15_10 = import ./purs/0.15.10.nix {
10+
inherit pkgs;
11+
};
912
purs-0_15_9 = import ./purs/0.15.9.nix {
1013
inherit pkgs;
1114
};
@@ -103,7 +106,7 @@ let
103106
inherit pkgs;
104107
};
105108

106-
purs = purs-0_15_9;
109+
purs = purs-0_15_10;
107110

108111
purs-simple = purs;
109112

purs/0.15.10.nix

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{ pkgs ? import <nixpkgs> { }, system ? pkgs.stdenv.hostPlatform.system }:
2+
3+
let
4+
version = "v0.15.10";
5+
6+
urls = {
7+
"x86_64-linux" = {
8+
url = "https://github.com/purescript/purescript/releases/download/${version}/linux64.tar.gz";
9+
sha256 = "03p5f2m5xvrqgiacs4yfc2dgz6frlxy90h6z1nm6wan40p2vd41r";
10+
};
11+
"x86_64-darwin" = {
12+
url = "https://github.com/purescript/purescript/releases/download/${version}/macos.tar.gz";
13+
sha256 = "14yd00v3dsnnwj2f645vy0apnp1843ms9ffd2ccv7bj5p4kxsdzg";
14+
};
15+
"aarch64-darwin" = {
16+
url = "https://github.com/purescript/purescript/releases/download/${version}/macos-arm64.tar.gz";
17+
sha256 = "1pk6mkjy09qvh8lsygb5gb77i2fqwjzz8jdjkxlyzynp3wpkcjp7";
18+
};
19+
};
20+
21+
src =
22+
if builtins.hasAttr system urls then
23+
(pkgs.fetchurl urls.${system})
24+
else
25+
throw "Architecture not supported: ${system}";
26+
in
27+
import ./mkPursDerivation.nix {
28+
inherit pkgs version src;
29+
}

purs/0.15.9.nix

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,15 @@ let
1212
url = "https://github.com/purescript/purescript/releases/download/${version}/macos.tar.gz";
1313
sha256 = "1xxg79rlf7li9f73wdbwif1dyy4hnzpypy6wx4zbnvap53habq9f";
1414
};
15+
"aarch64-darwin" = {
16+
url = "https://github.com/purescript/purescript/releases/download/${version}/macos-arm64.tar.gz";
17+
sha256 = "16ci26pgrw0zmnyn1zj129y9624cqwzrhqglc8mgfg4k7rxvqy2a";
18+
};
1519
};
1620

1721
src =
1822
if builtins.hasAttr system urls then
1923
(pkgs.fetchurl urls.${system})
20-
else if system == "aarch64-darwin" then
21-
let
22-
useArch = "x86_64-darwin";
23-
msg = "Using the non-native ${useArch} binary. While this binary may run under Rosetta 2 translation, no guarantees can be made about stability or performance.";
24-
in
25-
pkgs.lib.warn msg (pkgs.fetchurl urls.${useArch})
2624
else
2725
throw "Architecture not supported: ${system}";
2826
in

0 commit comments

Comments
 (0)