Skip to content

Unable to fetch git dependency. #645

Answered by ipetkov
levydsa asked this question in Q&A
Jun 12, 2024 · 7 comments · 3 replies
Discussion options

You must be logged in to vote

The problem is that build script will attempt to copy bindgen.rs to OUT_DIR multiple times. Here's what happens:

  1. Sources are vendored in a derivation which goes into the /nix/store/...
  2. Nix changes the permissions of the files to be readonly (i.e. r--, usually cargo keeps source files stored as rw-)
  3. When the vendored sources are linked to the deps/real derivations they maintain the same permission bits
  4. The build script will successfully copy bindgen.rs to OUT_DIR the first time, but the file will maintain its read-only r-- permissions
  5. A second attempt to overwrite the file fails since std::fs::copy appears to try to update the file in place (which fails due to no write-permissions)

If yo…

Replies: 7 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@levydsa
Comment options

@dpc
Comment options

@levydsa
Comment options

Answer selected by ipetkov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
bug Something isn't working
3 participants
Converted from issue

This discussion was converted from issue #644 on June 15, 2024 16:51.