Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nix flake: failed to create symbolic link #235

Closed
lachydavies25 opened this issue Aug 16, 2023 · 3 comments
Closed

nix flake: failed to create symbolic link #235

lachydavies25 opened this issue Aug 16, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@lachydavies25
Copy link

I am having issues with installing crunchy-cli using nix

To Reproduce
nix --extra-experimental-features "nix-command flakes" run github:crunchy-labs/crunchy-cli

failed to create symbolic link '/nix/store/56g9g326h70gm1bcjayq9q0insga7b0j-cargo-vendor-dir/native-tls-0.2.11/9dr71sh81nqhp3797mxzgdvz01iicxrg-native-tls-0.2.11': Permission denied

Screenshots
Screenshot 2023-08-16 at 8 10 48 pm

Client: M2 MacBook Air 2 15"

  • OS: MacOS public beta - Sonoma beta 3
@lachydavies25 lachydavies25 added the bug Something isn't working label Aug 16, 2023
@bytedream
Copy link
Member

@stepbrobd any idea why this fails?
If I'm correct this failure exists since dc6bc0d. Beginning with this commit the native-tls crate got replaced by a fork of it. If I remove the line which overwrites the crate with the fork, the error disappears.

@bytedream bytedream changed the title failed to create symbolic link nix flake: failed to create symbolic link Aug 16, 2023
@stepbrobd
Copy link
Contributor

If I'm correct this failure exists since dc6bc0d. Beginning with this commit the native-tls crate got replaced by a fork of it. If I remove the line which overwrites the crate with the fork, the error disappears.

Good catch! The line you mentioned resulted in two `native-tls` entries present in `Cargo.lock`, this is not supported by `buildRustPackage`.
 [[package]]
 name = "native-tls"
 version = "0.2.11"
 source = "git+https://github.com/crunchy-labs/rust-not-so-native-tls.git?rev=570100d#570100d3391bd9aab7a390cfef0d1a28e8efe200"
 ...
 [[package]]
 name = "native-tls"
 version = "0.2.11"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 ...

There are couple ways to solve this:

  1. Removing native-tls fork from dependencies, or
  2. Writing patch to remove duplicate entries in the Cargo.lock file, or
  3. Try using a community maintained toolchain, they might support duplicate entries in Cargo.lock (haven't tested this yet, will look into it).

Related:

@bytedream
Copy link
Member

I removed duplicated entry from Cargo.lock / now only rely on the [patch.crates-io] section in Cargo.toml.
@lachydavies25 you should be able to run it via nix now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants