~toastal/easy-purescript-nix

e39e5025e5a49734826a2390256f9c00938abf47 — James Brock 1 year, 3 months ago 7752e82
purs v0.15.9
2 files changed, 35 insertions(+), 1 deletions(-)

M default.nix
A purs/0.15.9.nix
M default.nix => default.nix +4 -1
@@ 6,6 6,9 @@ let
  };

  inputs = rec {
    purs-0_15_9 = import ./purs/0.15.9.nix {
      inherit pkgs;
    };
    purs-0_15_8 = import ./purs/0.15.8.nix {
      inherit pkgs;
    };


@@ 100,7 103,7 @@ let
      inherit pkgs;
    };

    purs = purs-0_15_8;
    purs = purs-0_15_9;

    purs-simple = purs;


A purs/0.15.9.nix => purs/0.15.9.nix +31 -0
@@ 0,0 1,31 @@
{ pkgs ? import <nixpkgs> { }, system ? pkgs.stdenv.hostPlatform.system }:

let
  version = "v0.15.9";

  urls = {
    "x86_64-linux" = {
      url = "https://github.com/purescript/purescript/releases/download/${version}/linux64.tar.gz";
      sha256 = "0rabinklsd8bs16f03zv7ij6d1lv4w2xwvzzgkwc862gpqvz9jq3";
    };
    "x86_64-darwin" = {
      url = "https://github.com/purescript/purescript/releases/download/${version}/macos.tar.gz";
      sha256 = "1xxg79rlf7li9f73wdbwif1dyy4hnzpypy6wx4zbnvap53habq9f";
    };
  };

  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
import ./mkPursDerivation.nix {
  inherit pkgs version src;
}