diff options
author | Ben Gamari <ben@smart-cactus.org> | 2022-03-26 11:58:15 -0400 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-04-06 13:03:16 -0400 |
commit | 018453751b10cf26506d5076f08fc3a537973d9e (patch) | |
tree | 6635e76849950b6c59db72b920192eb1d243bfe2 | |
parent | 9ce273b98b06823fc04946806c1e497f6b0c68fc (diff) | |
download | haskell-018453751b10cf26506d5076f08fc3a537973d9e.tar.gz |
gitlab/darwin: Factor out bindists
This makes it a bit easier to bump them.
-rw-r--r-- | .gitlab/darwin/toolchain.nix | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/.gitlab/darwin/toolchain.nix b/.gitlab/darwin/toolchain.nix index fe221b3c43..f94dd5c9be 100644 --- a/.gitlab/darwin/toolchain.nix +++ b/.gitlab/darwin/toolchain.nix @@ -12,22 +12,21 @@ let happy = hsPkgs.happy; targetTriple = pkgs.stdenv.targetPlatform.config; + ghcBindists = let version = ghc.version; in { + aarch64-darwin = pkgs.fetchurl { + url = "https://downloads.haskell.org/ghc/${version}/ghc-${version}-aarch64-apple-darwin.tar.xz"; + sha256 = "sha256:075skdnsa072088a8jfkqac7pphkgzlgqpspb8xa7ljzqg1ryinw"; + }; + x86_64-darwin = pkgs.fetchurl { + url = "https://downloads.haskell.org/ghc/${version}/ghc-${version}-x86_64-apple-darwin.tar.xz"; + sha256 = "sha256:0ir02gjyb4l073z4gs3f1zjkx04n14dp7a5z4cqzbj9qqgwv0z98"; + }; + }; + ghc = pkgs.stdenv.mkDerivation rec { version = "8.10.7"; name = "ghc"; - src = - let - bindists = { - aarch64-darwin = { - url = "https://downloads.haskell.org/ghc/${version}/ghc-${version}-aarch64-apple-darwin.tar.xz"; - sha256 = "sha256:075skdnsa072088a8jfkqac7pphkgzlgqpspb8xa7ljzqg1ryinw"; - }; - x86_64-darwin = { - url = "https://downloads.haskell.org/ghc/${version}/ghc-${version}-x86_64-apple-darwin.tar.xz"; - sha256 = "sha256:0ir02gjyb4l073z4gs3f1zjkx04n14dp7a5z4cqzbj9qqgwv0z98"; - }; - }; - in pkgs.fetchurl bindists.${pkgs.stdenv.hostPlatform.system}; + src = ghcBindists.${pkgs.stdenv.hostPlatform.system}; configureFlags = [ "CC=/usr/bin/clang" "CLANG=/usr/bin/clang" |