Skip to content

Commit 9c4e9cc

Browse files
committed
Clean up postgresql postFixup: remove debug output
The build failure is NOT a reference cycle — it's the Determinate Nix daemon's orphaned store path bug on macOS (APFS). Outputs exist on disk but fail to register in the Nix DB (.lock files present, nix path-info says "not valid"). Confirmed on darwin-8: all 5 postgresql outputs are orphaned despite sync-before-registering=true being deployed. Keep the remove-references-to fix (strips dev ref from libecpg.so) as a precaution against actual cycles, but the primary failure mode is the daemon registration bug. The changed postFixup produces a new drv hash, avoiding the FailedPaths cache on hydra without manual DB cleanup.
1 parent eb62238 commit 9c4e9cc

File tree

1 file changed

+8
-19
lines changed

1 file changed

+8
-19
lines changed

flake.nix

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -173,28 +173,17 @@
173173
outputChecks = {};
174174
separateDebugInfo = false;
175175
disallowedReferences = [];
176-
# Break the dev↔lib reference cycle: dev naturally references
177-
# lib (via .pc -L flags), but lib also picks up dev references
178-
# through .la files and baked-in paths. Strip dev refs from lib
179-
# since lib is a runtime output that doesn't need dev at runtime.
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.
180184
postFixup = (old.postFixup or "") + ''
181-
echo "=== postFixup: stripping dev refs from lib ==="
182-
echo "lib=$lib"
183-
echo "dev=$dev"
184-
echo "Files in lib:"
185-
find "$lib" -type f | head -20
186-
# Delete .la files from lib — libtool archives embed absolute
187-
# paths to dev headers/libs and are unnecessary for runtime.
188185
find "$lib" -name '*.la' -delete
189-
# Check which files in lib reference dev before stripping.
190-
echo "Files in lib referencing dev hash:"
191-
DEV_HASH=$(echo "$dev" | sed 's|/nix/store/||; s|-.*||')
192-
grep -rl "$DEV_HASH" "$lib" 2>/dev/null || echo " (none found)"
193-
# Strip any remaining references to $dev from the lib output.
194186
find "$lib" -type f -exec remove-references-to -t "$dev" {} +
195-
echo "After stripping, files referencing dev hash:"
196-
grep -rl "$DEV_HASH" "$lib" 2>/dev/null || echo " (none found)"
197-
echo "=== postFixup done ==="
198187
'';
199188
});
200189
});

0 commit comments

Comments
 (0)