|
162 | 162 | doCheck = false; |
163 | 163 | outputChecks = {}; |
164 | 164 | separateDebugInfo = false; |
165 | | - # generic.nix sets disallowedReferences = [ stdenv'.cc ] which |
166 | | - # scans outputs for references to the C compiler AFTER all build |
167 | | - # phases complete. For musl cross-compilation, .pc files or .la |
168 | | - # files may retain references to the cross-compiler, causing a |
169 | | - # silent post-fixup failure (all phases complete, no error in |
170 | | - # build log, but build recorded as failed). |
171 | 165 | disallowedReferences = []; |
172 | | - # Force new drv hash to bypass hydra queue runner's persistent |
173 | | - # failure cache. Previous builds succeeded but outputs were not |
174 | | - # registered in the Nix DB (Determinate Nix orphaned store path |
175 | | - # bug). Orphaned paths cleaned and sync-before-registering deployed. |
176 | | - preBuild = (old.preBuild or "") + '' |
177 | | - # cache breaker v2: sync-before-registering deployed 2026-02-17 |
178 | | - true |
| 166 | + # Merge all outputs into "out" to work around Determinate Nix |
| 167 | + # orphaned store path bug on macOS (APFS). Multi-output derivations |
| 168 | + # fail to register atomically in the Nix DB — the build completes |
| 169 | + # but outputs remain orphaned (exist on disk, not valid in DB). |
| 170 | + # sync-before-registering = true did not fix this. Single-output |
| 171 | + # avoids the multi-output registration path entirely. Consumers |
| 172 | + # (haskell.nix libpq) only need lib/ and bin/pg_config anyway. |
| 173 | + outputs = [ "out" ]; |
| 174 | + # Replace the upstream postInstall which splits outputs and |
| 175 | + # removes pg_config from $out. We need everything in $out. |
| 176 | + postInstall = '' |
| 177 | + make -C src/common pg_config.env |
| 178 | + install -D src/common/pg_config.env "$out/nix-support/pg_config.env" |
179 | 179 | ''; |
180 | 180 | }); |
181 | 181 | }); |
|
0 commit comments