Skip to content

Commit eee10e3

Browse files
committed
Fix postgresql-musl: strip dev refs from out AND lib outputs
The real reference cycle is dev↔out (not dev↔lib as previously thought): - dev references out via .pc -L flags - out references dev via baked-in paths in binaries Building on hydra (standard Nix, ext4) confirmed: "cycle detected in references of output 'dev' from output 'out'" On darwin builders (Determinate Nix, APFS), this manifests as orphaned store paths instead of a clean error: outputs exist on disk but daemon fails to register them in the Nix DB. Fix: strip dev references from BOTH out and lib outputs in postFixup, since neither needs dev at runtime. Also remove .la files which embed dev paths.
1 parent 9c4e9cc commit eee10e3

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

flake.nix

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -173,15 +173,13 @@
173173
outputChecks = {};
174174
separateDebugInfo = false;
175175
disallowedReferences = [];
176-
# Strip dev references from lib output: libecpg.so embeds a
177-
# reference to $dev (via ecpg binary path). This would create
178-
# a dev↔lib cycle since dev already references lib via .pc
179-
# files. The lib output is runtime-only and doesn't need dev.
180-
# Note: builds may still fail due to Determinate Nix daemon
181-
# orphaned store path bug on macOS (APFS) — outputs exist on
182-
# disk but fail to register in the Nix DB. This is independent
183-
# of the reference cycle fix.
176+
# Break the dev↔out reference cycle: dev references out (via
177+
# .pc -L flags), and out references dev (via baked-in paths
178+
# in binaries/libs). Strip dev refs from both out and lib
179+
# outputs since neither needs dev at runtime.
184180
postFixup = (old.postFixup or "") + ''
181+
find "$out" -name '*.la' -delete
182+
find "$out" -type f -exec remove-references-to -t "$dev" {} +
185183
find "$lib" -name '*.la' -delete
186184
find "$lib" -type f -exec remove-references-to -t "$dev" {} +
187185
'';

0 commit comments

Comments
 (0)