|
82 | 82 | # of 'lib.systems.examples' are not understood between all versions
|
83 | 83 | let lib = nixpkgs.lib;
|
84 | 84 | in lib.optionalAttrs (nixpkgsName == "unstable"
|
85 |
| - && (__match ".*llvm" compiler-nix-name == null) |
86 |
| - && !builtins.elem compiler-nix-name ["ghc9102"]) { |
87 |
| - inherit (lib.systems.examples) ghcjs; |
88 |
| - } // lib.optionalAttrs (nixpkgsName == "unstable" |
89 |
| - && (__match ".*llvm" compiler-nix-name == null) |
90 |
| - && ((system == "x86_64-linux" && !builtins.elem compiler-nix-name ["ghc902" "ghc928"]) |
91 |
| - || (system == "x86_64-darwin" && builtins.elem compiler-nix-name []))) { # TODO add ghc versions when we have more darwin build capacity |
92 |
| - inherit (lib.systems.examples) mingwW64; |
93 |
| - } // lib.optionalAttrs (nixpkgsName == "unstable" |
94 |
| - && (__match ".*llvm" compiler-nix-name == null) |
95 |
| - && ((system == "x86_64-linux" && !builtins.elem compiler-nix-name ["ghc8107" "ghc902" "ghc928" "ghc948"]) |
96 |
| - || (system == "x86_64-darwin" && builtins.elem compiler-nix-name []))) { # TODO add ghc versions when we have more darwin build capacity |
97 |
| - inherit (lib.systems.examples) ucrt64; |
98 |
| - } // lib.optionalAttrs (system == "x86_64-linux" && nixpkgsName == "unstable" && !builtins.elem compiler-nix-name ["ghc902" "ghc928" "ghc948"]) { |
99 |
| - # Musl cross only works on linux |
100 |
| - # aarch64 cross only works on linux |
101 |
| - inherit (lib.systems.examples) musl64 aarch64-multiplatform; |
102 |
| - } // lib.optionalAttrs (__match ".*llvm" compiler-nix-name == null && system == "x86_64-linux" && nixpkgsName == "unstable" && !builtins.elem compiler-nix-name ["ghc902" "ghc928" "ghc948"]) { |
103 |
| - # Out llvm versions of GHC seem to break for musl32 |
104 |
| - inherit (lib.systems.examples) musl32; |
105 |
| - } // lib.optionalAttrs (system == "x86_64-linux" && !builtins.elem compiler-nix-name ["ghc902" "ghc928" "ghc948"]) { |
106 |
| - inherit (lib.systems.examples) aarch64-android-prebuilt; |
107 |
| - } // lib.optionalAttrs (system == "x86_64-linux" && !builtins.elem compiler-nix-name ["ghc902" "ghc928" "ghc948" "ghc91320250523"]) { |
108 |
| - inherit (lib.systems.examples) armv7a-android-prebuilt; |
109 |
| - } // lib.optionalAttrs (system == "x86_64-linux" && nixpkgsName == "unstable" && !builtins.elem compiler-nix-name ["ghc8107" "ghc902"]) { |
110 |
| - # TODO fix this for the compilers we build with hadrian (ghc >=9.4) |
111 |
| - inherit (lib.systems.examples) aarch64-multiplatform-musl; |
112 |
| - } // lib.optionalAttrs (system == "aarch64-linux" && nixpkgsName == "unstable" && !builtins.elem compiler-nix-name ["ghc8107" "ghc902"]) { |
113 |
| - inherit (lib.systems.examples) aarch64-multiplatform-musl; |
114 |
| - }; |
| 85 | + && __match ".*llvm" compiler-nix-name == null |
| 86 | + && builtins.elem system ["aarch64-linux" "x86_64-linux"]) { |
| 87 | + static = p: p.pkgsStatic; |
| 88 | + } // lib.optionalAttrs (nixpkgsName == "unstable" |
| 89 | + && (__match ".*llvm" compiler-nix-name == null) |
| 90 | + && !builtins.elem compiler-nix-name ["ghc9102"]) { |
| 91 | + inherit (lib.systems.examples) ghcjs; |
| 92 | + } // lib.optionalAttrs (nixpkgsName == "unstable" |
| 93 | + && (__match ".*llvm" compiler-nix-name == null) |
| 94 | + && ((system == "x86_64-linux" && !builtins.elem compiler-nix-name ["ghc902" "ghc928"]) |
| 95 | + || (system == "x86_64-darwin" && builtins.elem compiler-nix-name []))) { # TODO add ghc versions when we have more darwin build capacity |
| 96 | + inherit (lib.systems.examples) mingwW64; |
| 97 | + } // lib.optionalAttrs (nixpkgsName == "unstable" |
| 98 | + && (__match ".*llvm" compiler-nix-name == null) |
| 99 | + && ((system == "x86_64-linux" && !builtins.elem compiler-nix-name ["ghc8107" "ghc902" "ghc928" "ghc948"]) |
| 100 | + || (system == "x86_64-darwin" && builtins.elem compiler-nix-name []))) { # TODO add ghc versions when we have more darwin build capacity |
| 101 | + inherit (lib.systems.examples) ucrt64; |
| 102 | + } // lib.optionalAttrs (system == "x86_64-linux" && nixpkgsName == "unstable" && !builtins.elem compiler-nix-name ["ghc902" "ghc928" "ghc948"]) { |
| 103 | + # Musl cross only works on linux |
| 104 | + # aarch64 cross only works on linux |
| 105 | + inherit (lib.systems.examples) musl64 aarch64-multiplatform; |
| 106 | + } // lib.optionalAttrs (__match ".*llvm" compiler-nix-name == null && system == "x86_64-linux" && nixpkgsName == "unstable" && !builtins.elem compiler-nix-name ["ghc902" "ghc928" "ghc948"]) { |
| 107 | + # Out llvm versions of GHC seem to break for musl32 |
| 108 | + inherit (lib.systems.examples) musl32; |
| 109 | + } // lib.optionalAttrs (system == "x86_64-linux" && !builtins.elem compiler-nix-name ["ghc902" "ghc928" "ghc948"]) { |
| 110 | + inherit (lib.systems.examples) aarch64-android-prebuilt; |
| 111 | + } // lib.optionalAttrs (system == "x86_64-linux" && !builtins.elem compiler-nix-name ["ghc902" "ghc928" "ghc948" "ghc91320250523"]) { |
| 112 | + inherit (lib.systems.examples) armv7a-android-prebuilt; |
| 113 | + } // lib.optionalAttrs (system == "x86_64-linux" && nixpkgsName == "unstable" && !builtins.elem compiler-nix-name ["ghc8107" "ghc902"]) { |
| 114 | + # TODO fix this for the compilers we build with hadrian (ghc >=9.4) |
| 115 | + inherit (lib.systems.examples) aarch64-multiplatform-musl; |
| 116 | + } // lib.optionalAttrs (system == "aarch64-linux" && nixpkgsName == "unstable" && !builtins.elem compiler-nix-name ["ghc8107" "ghc902"]) { |
| 117 | + inherit (lib.systems.examples) aarch64-multiplatform-musl; |
| 118 | + }; |
115 | 119 | isDisabled = d: d.meta.disabled or false;
|
116 | 120 | in
|
117 | 121 | dimension "Nixpkgs version" nixpkgsVersions (nixpkgsName: pinnedNixpkgsSrc:
|
@@ -140,8 +144,10 @@ dimension "Nixpkgs version" nixpkgsVersions (nixpkgsName: pinnedNixpkgsSrc:
|
140 | 144 | }
|
141 | 145 | //
|
142 | 146 | dimension "Cross system" (crossSystems nixpkgsName evalPackages compiler-nix-name) (crossSystemName: crossSystem:
|
143 |
| - # Cross builds |
144 |
| - let pkgs = import pinnedNixpkgsSrc (nixpkgsArgs // { inherit system crossSystem; }); |
| 147 | + let pkgs = |
| 148 | + if builtins.isAttrs crossSystem |
| 149 | + then import pinnedNixpkgsSrc (nixpkgsArgs // { inherit system crossSystem; }) |
| 150 | + else crossSystem (import pinnedNixpkgsSrc (nixpkgsArgs // { inherit system; })); |
145 | 151 | build = import ./build.nix { inherit pkgs evalPackages ifdLevel compiler-nix-name haskellNix; };
|
146 | 152 | in pkgs.recurseIntoAttrs (pkgs.lib.optionalAttrs (ifdLevel >= 1) ({
|
147 | 153 | roots = pkgs.haskell-nix.roots' { inherit compiler-nix-name evalPackages; } ifdLevel // {
|
|
0 commit comments