on 19052d8 help sign in
33 lines 2.2 kB history raw
1# This is for checking the materialization of new GHC versions
2# See docs/adding-new-ghc.md for more details.
3{ compiler-nix-name, systems ? [ builtins.currentSystem ] }:
4let
5 eval = (import ../../. {}).pkgs;
6in eval.linkFarm "check-${compiler-nix-name}" (builtins.concatMap (system:
7 let haskellNix = import ../../. { checkMaterialization = true; inherit system; };
8 pkgs = haskellNix.pkgs-unstable;
9 inherit (pkgs.haskell-nix.compiler.${compiler-nix-name}) version;
10 # Older versions of GHC do not work with the latest nixpkgs.
11 pkgsForWindows =
12 if __compareVersions version "8.10" >= 0
13 then pkgs
14 else import haskellNix.sources.nixpkgs-2105
15 (haskellNix.nixpkgsArgs // { localSystem = { inherit system; }; });
16 in [
17 # This set of derivations should be enough to ensure all the materialized files for a
18 # given GHC version are checked.
19 { name = "${system}-cabal-install"; path = pkgs.haskell-nix.cabal-install.${compiler-nix-name}; }
20 { name = "${system}-nix-tools"; path = pkgs.haskell-nix.nix-tools.${compiler-nix-name}; }
21 { name = "${system}-extra"; path = pkgs.ghc-extra-projects.${compiler-nix-name}.plan-nix; }
22 { name = "${system}-boot"; path = pkgs.ghc-boot-packages-nix.${compiler-nix-name}; }
23] ++ eval.lib.optionals (system == "x86_64-linux") ([
24 # In some cased you may need comment out one or more of these if the GHC version needed cannot be built.
25 { name = "${system}-musl"; path = pkgs.pkgsCross.musl64.ghc-extra-projects.${compiler-nix-name}.plan-nix; }
26] ++ eval.lib.optionals (!__elem compiler-nix-name ["ghc901"]) [
27 { name = "${system}-windows"; path = pkgsForWindows.pkgsCross.mingwW64.ghc-extra-projects.${compiler-nix-name}.plan-nix; }
28] ++ eval.lib.optionals (__elem compiler-nix-name ["ghc884" "ghc8105" "ghc8106" "ghc8107"]) [
29 { name = "${system}-arm"; path = pkgs.pkgsCross.aarch64-multiplatform.ghc-extra-projects.${compiler-nix-name}.plan-nix; }
30]) ++ eval.lib.optionals (__elem compiler-nix-name ["ghc865" "ghc884" "ghc8105" "ghc8106" "ghc8107"]) [
31 { name = "${system}-ghcjs"; path = pkgs.pkgsCross.ghcjs.ghc-extra-projects.${compiler-nix-name}.plan-nix; }
32]) systems)