-
Notifications
You must be signed in to change notification settings - Fork 89
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
Cannot generate the with_problematic_crates
Cargo.nix sample
#36
Comments
Hmm, good question. So, unfortunately, the The rest are not. Especially the libPath = "lib.rs" things should not be added since e2a0cc6, I guess? In general, some of the changes could be explained by a |
Any ideas how to follow up on this? |
Maybe you can try executing the "./regenerate_cargo_nix.sh" |
When the ~/.cargo directory is symlinked, the `target.src_path` needs to be canonicalized to be able to strip the prefix (`package_path`), which has already been canonicalized. Suppose `~/.cargo` is a symlinked to `/mnt/cargo`: - if `target.src_path` is something such as `/home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/winreg-0.6.2` - `package_path` would be something such as `/mnt/.cargo/registry/src/github.com-1ecc6299db9ec823/winreg-0.6.2` Since `package_path` is not a prefix of `target.src_path`, `strip_prefix` returns an error and no `libPath` attribute are created. fix nix-community#36
When the ~/.cargo directory is symlinked, the `target.src_path` needs to be canonicalized to be able to strip the prefix (`package_path`), since it has already been canonicalized. Suppose `/home/user/.cargo` is a symlinked to `/mnt/.cargo`: - if `target.src_path` is something such as `/home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/winreg-0.6.2` - then `package_path` would be something such as `/mnt/.cargo/registry/src/github.com-1ecc6299db9ec823/winreg-0.6.2` In this scenario, since `package_path` is not a prefix of `target.src_path`, `strip_prefix` returns an error and no `libPath` attribute are created. Fixes nix-community#36
When the ~/.cargo directory is symlinked, the `target.src_path` needs to be canonicalized to be able to strip the prefix (`package_path`), since it has already been canonicalized. Suppose `/home/user/.cargo` is a symlinked to `/mnt/.cargo`: - if `target.src_path` is something such as `/home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/winreg-0.6.2` - then `package_path` would be something such as `/mnt/.cargo/registry/src/github.com-1ecc6299db9ec823/winreg-0.6.2` In this scenario, since `package_path` is not a prefix of `target.src_path`, `strip_prefix` returns an error and no `libPath` attribute are created. Fixes nix-community#36
When the ~/.cargo directory is symlinked, the `target.src_path` needs to be canonicalized to be able to strip the prefix (`package_path`), since it has already been canonicalized. Suppose `/home/user/.cargo` is a symlink to `/mnt/.cargo`: - if `target.src_path` is something such as `/home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/winreg-0.6.2` - then `package_path` would be something such as `/mnt/.cargo/registry/src/github.com-1ecc6299db9ec823/winreg-0.6.2` In this scenario, since `package_path` is not a prefix of `target.src_path`, `strip_prefix` returns an error and no `libPath` attribute are created. Fixes nix-community#36
I'm trying to (re)generate the
Cargo.nix
file from the sample projectwith_problematic_crates
but mycrate2nix
doesn't generate the same file (libPath
attributes are missing for instance)Here are the commands I executed:
The Cargo.nix file I generated: nlewo@047ae1d#diff-d44232a1e2e6e2b12c8e1ef2226078bc
Did I miss something or is it an real issue?
The text was updated successfully, but these errors were encountered: