Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to purs 0.15.10 and provide aarch64-darwin builds #230

Merged
merged 1 commit into from
Jul 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ let
};

inputs = rec {
purs-0_15_10 = import ./purs/0.15.10.nix {
inherit pkgs;
};
purs-0_15_9 = import ./purs/0.15.9.nix {
inherit pkgs;
};
Expand Down Expand Up @@ -103,7 +106,7 @@ let
inherit pkgs;
};

purs = purs-0_15_9;
purs = purs-0_15_10;

purs-simple = purs;

Expand Down
29 changes: 29 additions & 0 deletions purs/0.15.10.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{ pkgs ? import <nixpkgs> { }, system ? pkgs.stdenv.hostPlatform.system }:

let
version = "v0.15.10";

urls = {
"x86_64-linux" = {
url = "https://github.com/purescript/purescript/releases/download/${version}/linux64.tar.gz";
sha256 = "03p5f2m5xvrqgiacs4yfc2dgz6frlxy90h6z1nm6wan40p2vd41r";
};
"x86_64-darwin" = {
url = "https://github.com/purescript/purescript/releases/download/${version}/macos.tar.gz";
sha256 = "14yd00v3dsnnwj2f645vy0apnp1843ms9ffd2ccv7bj5p4kxsdzg";
};
"aarch64-darwin" = {
url = "https://github.com/purescript/purescript/releases/download/${version}/macos-arm64.tar.gz";
sha256 = "1pk6mkjy09qvh8lsygb5gb77i2fqwjzz8jdjkxlyzynp3wpkcjp7";
};
};

src =
if builtins.hasAttr system urls then
(pkgs.fetchurl urls.${system})
else
throw "Architecture not supported: ${system}";
in
import ./mkPursDerivation.nix {
inherit pkgs version src;
}
10 changes: 4 additions & 6 deletions purs/0.15.9.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,15 @@ let
url = "https://github.com/purescript/purescript/releases/download/${version}/macos.tar.gz";
sha256 = "1xxg79rlf7li9f73wdbwif1dyy4hnzpypy6wx4zbnvap53habq9f";
};
"aarch64-darwin" = {
url = "https://github.com/purescript/purescript/releases/download/${version}/macos-arm64.tar.gz";
sha256 = "16ci26pgrw0zmnyn1zj129y9624cqwzrhqglc8mgfg4k7rxvqy2a";
};
};

src =
if builtins.hasAttr system urls then
(pkgs.fetchurl urls.${system})
else if system == "aarch64-darwin" then
let
useArch = "x86_64-darwin";
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.";
in
pkgs.lib.warn msg (pkgs.fetchurl urls.${useArch})
else
throw "Architecture not supported: ${system}";
in
Expand Down
Loading