|
59 | 59 | # (we need to upgrade `nix-tools` to Cabal 3 for them to work) |
60 | 60 | skipBroken = self.lib.filterAttrs (pkgName: _: |
61 | 61 | ghcName == "ghc865" || (pkgName != "base" && pkgName != "ghc-heap")); |
62 | | - sha256 = ghc-boot-packages-nix-sha256."${ghcName}" or null; |
63 | 62 | materializedPath = ../materialized/ghc-boot-packages-nix + "/${ghcName}"; |
64 | 63 | in (self.haskell-nix.materialize ({ |
65 | | - inherit sha256; |
66 | | - materialized = if sha256 != null && __pathExists materializedPath |
| 64 | + materialized = if __pathExists materializedPath |
67 | 65 | then materializedPath |
68 | 66 | else null; |
69 | | - sha256Arg = "ghc-boot-packages-nix-sha256"; |
70 | | - reasonNotSafe = null; |
71 | 67 | }) (combineFiles "${ghcName}-boot-packages-nix" ".nix" (builtins.mapAttrs |
72 | 68 | (_: sdistAndNix: sdistAndNix.nix) (skipBroken bootPackages)))); |
73 | 69 |
|
|
89 | 85 | iserv-proxy = "utils/iserv-proxy"; |
90 | 86 | }; |
91 | 87 |
|
92 | | - # Hashes needed to make ghc-boot-packages use fixed output derivations |
93 | | - # for the nix files. |
94 | | - ghc-boot-packages-nix-sha256 = { |
95 | | - ghc865 = "0n5bsi67mczbwch8a3dwf58hkignb8qswv7h707dqgc43himvq3b"; |
96 | | - ghc882 = "1wpvy0f2m7l3h8fz0iag3q8zj6j4i7732x1f0lkxnr2whnv88dfb"; |
97 | | - ghc883 = "147l5a7vm8dgyb2wz692p3n3fsvq8wbjn5wnjhabdgw4mxw0c2mm"; |
98 | | - }; |
99 | | - |
100 | 88 | # The nix produced by `cabalProject` differs slightly depending on |
101 | 89 | # what the platforms are. There are currently 3 possible outputs. |
102 | 90 | ghc-extra-projects-type = |
|
106 | 94 | then "cross" |
107 | 95 | else "default"; |
108 | 96 |
|
109 | | - # Hashes needed to make ghc-extra-projects use fixed output derivations |
110 | | - # for the nix files. |
111 | | - ghc-extra-projects-sha256 = { |
112 | | - default = { |
113 | | - ghc865 = "12mj0fmm0b0jys6pb2l7l9w2w5as5fiqkfav81mjlz9ic1rkqk92"; |
114 | | - ghc882 = "0q4v1iryvd5xvnkb1s02a3v6x0lj73r8bsfxrs9bxipk22bcksm9"; |
115 | | - ghc883 = "0dy6isqz41c0di5yf1mhyp0nbp6aw5m947b54l5074lkmc4f5alb"; |
116 | | - }; |
117 | | - windows = { |
118 | | - ghc865 = "1jizwsnmdr2iglispm9wmhhbdh2gh6yfvk8x1jbj0sk9pq21xwap"; |
119 | | - ghc882 = "09ji5548bsqqa7iwphjxmc5i067ya6zh0v1hfls9acfrxax0sfgm"; |
120 | | - ghc883 = "0gliadn1nj1i5y5hjz280h1kgzql97yfh4gy63k2g7xsldmzb57b"; |
121 | | - }; |
122 | | - cross = { |
123 | | - ghc865 = "10bckrm3qi1vymncjiv534b8nb8bgix8w8y91543xxwhzpmwml3f"; |
124 | | - ghc882 = "0hamwh6x0vfki2c4kj132x2c2hqvr1r735cfd4yrygzf86drmyf0"; |
125 | | - ghc883 = "0v8wq8i82c329kzi3yzv6ny63yaggbzdaaxbbklxwg16fawqn08p"; |
126 | | - }; |
127 | | - }; |
128 | | - |
129 | 97 | # Given the ghc-extra-pkgs, we'll create a cabal.project |
130 | 98 | # that contains all of them. And then we call cabalProject |
131 | 99 | # on it to generate the necessary cabal project exposing all |
@@ -200,11 +168,8 @@ in rec { |
200 | 168 | name = "ghc-extra-projects-${ghc-extra-projects-type}-${ghcName}"; |
201 | 169 | src = proj; |
202 | 170 | index-state = self.haskell-nix.internalHackageIndexState; |
203 | | - plan-sha256 = |
204 | | - ghc-extra-projects-sha256."${ghc-extra-projects-type}"."${ghcName}" |
205 | | - or null; |
206 | 171 | materialized = |
207 | | - if ghc-extra-projects-sha256."${ghc-extra-projects-type}" ? "${ghcName}" |
| 172 | + if __pathExists materializedPath |
208 | 173 | then materializedPath |
209 | 174 | else null; |
210 | 175 | ghc = self.buildPackages.haskell-nix.compiler.${ghcName}; |
|
0 commit comments