Skip to content

Commit f646ca9

Browse files
authored
Merge pull request #224 from jamesdbrock/spagoup
Update spago 0.21.0, purs v0.15.9
2 parents 3dc8d80 + e39e502 commit f646ca9

File tree

3 files changed

+39
-5
lines changed

3 files changed

+39
-5
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_9 = import ./purs/0.15.9.nix {
10+
inherit pkgs;
11+
};
912
purs-0_15_8 = import ./purs/0.15.8.nix {
1013
inherit pkgs;
1114
};
@@ -100,7 +103,7 @@ let
100103
inherit pkgs;
101104
};
102105

103-
purs = purs-0_15_8;
106+
purs = purs-0_15_9;
104107

105108
purs-simple = purs;
106109

purs/0.15.9.nix

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{ pkgs ? import <nixpkgs> { }, system ? pkgs.stdenv.hostPlatform.system }:
2+
3+
let
4+
version = "v0.15.9";
5+
6+
urls = {
7+
"x86_64-linux" = {
8+
url = "https://github.com/purescript/purescript/releases/download/${version}/linux64.tar.gz";
9+
sha256 = "0rabinklsd8bs16f03zv7ij6d1lv4w2xwvzzgkwc862gpqvz9jq3";
10+
};
11+
"x86_64-darwin" = {
12+
url = "https://github.com/purescript/purescript/releases/download/${version}/macos.tar.gz";
13+
sha256 = "1xxg79rlf7li9f73wdbwif1dyy4hnzpypy6wx4zbnvap53habq9f";
14+
};
15+
};
16+
17+
src =
18+
if builtins.hasAttr system urls then
19+
(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})
26+
else
27+
throw "Architecture not supported: ${system}";
28+
in
29+
import ./mkPursDerivation.nix {
30+
inherit pkgs version src;
31+
}

spago.nix

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,16 @@ in
1313
pkgs.stdenv.mkDerivation rec {
1414
pname = "spago";
1515

16-
version = "0.20.9";
16+
version = "0.21.0";
1717

1818
src = if pkgs.stdenv.isDarwin
1919
then pkgs.fetchurl {
2020
url = "https://github.com/purescript/spago/releases/download/${version}/macOS.tar.gz";
21-
sha256 = "1c6i4pdr23n65pahw0hgv8g99w1cmv1zxm6j3ih18ch1xq32dzq9";
21+
sha256 = "19c0kdg7gk1c7v00lnkcsxidffab84d50d6l6vgrjy4i86ilhzd5";
2222
}
2323
else pkgs.fetchurl {
2424
url = "https://github.com/purescript/spago/releases/download/${version}/Linux.tar.gz";
25-
sha256 = "0d9hlr1lx5g4dmhs77wp1ccrpngfx84x082pi2fwfldr8xm6600m";
25+
sha256 = "1klczy04vwn5b39cnxflcqzap0d5kysp4dsw73i95xm5m7s37049";
2626
};
2727

2828
buildInputs = [ pkgs.gmp pkgs.zlib pkgs.ncurses5 pkgs.stdenv.cc.cc.lib ];
@@ -38,10 +38,10 @@ pkgs.stdenv.mkDerivation rec {
3838
SPAGO=$out/bin/spago
3939
${patchelf libPath}
4040
41-
4241
mkdir -p $out/etc/bash_completion.d/
4342
$SPAGO --bash-completion-script $SPAGO > $out/etc/bash_completion.d/spago-completion.bash
4443
'';
4544

4645
dontInstall = true;
4746
}
47+

0 commit comments

Comments
 (0)