Skip to content

fix: dereference symlinks when copying nix store paths in release-build#5134

Merged
paolino merged 1 commit into
masterfrom
fix/5131-windows-cross-compile-chmod
Feb 10, 2026
Merged

fix: dereference symlinks when copying nix store paths in release-build#5134
paolino merged 1 commit into
masterfrom
fix/5131-windows-cross-compile-chmod

Conversation

@paolino
Copy link
Copy Markdown
Collaborator

@paolino paolino commented Feb 10, 2026

Summary

  • cp -Rcp -RL in nix/release-build.nix
  • DLLs in the haskell.nix output are symlinks to other store paths; cp -R preserves them, then chmod +w follows them to the read-only nix store and fails on the CI builder (nix 2.24.11)
  • -L dereferences all symlinks, producing real copies that can be chmod'd

Fixes #5131

@paolino paolino force-pushed the fix/5131-windows-cross-compile-chmod branch 8 times, most recently from e4ff9d5 to 47df0c7 Compare February 10, 2026 13:24
The DLLs in the haskell.nix output are symlinks to other store paths.
`cp -R` preserves these symlinks, so `chmod +w` follows them back to
the read-only nix store and fails with "Operation not permitted" on the
CI builder (nix 2.24.11).

Adding `-L` makes cp dereference all symlinks, producing real copies
that can be chmod'd normally.

Fixes #5131
@paolino paolino force-pushed the fix/5131-windows-cross-compile-chmod branch from 47df0c7 to dcd7f82 Compare February 10, 2026 13:30
@paolino paolino changed the title fix: use --no-preserve=mode when copying from nix store paths fix: dereference symlinks when copying nix store paths in release-build Feb 10, 2026
@paolino paolino merged commit a54a40d into master Feb 10, 2026
56 checks passed
@paolino paolino deleted the fix/5131-windows-cross-compile-chmod branch February 10, 2026 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: Windows cross-compile fails with chmod on nix store DLLs

1 participant