You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
buildRustPackage fails for projects with no dependencies in Cargo.toml #22737
❯ nix-build release.nix -A build --arg nixpkgs '<nixpkgs>' --argstr system x86_64-linux
these derivations will be built:
/nix/store/dw177b3in0rmfsx237jlzqimbjmcxrpk-ill-fetch.drv
/nix/store/c4klqbmccg501naxznl48w24hpazgdc1-ill.drv
building path(s) ‘/nix/store/dy1dywfq2mh035z4v0phmx0kg7p066cw-ill-fetch’
unpacking sources
unpacking source archive /nix/store/q6b7iql14yafz8j2hqq3x4g6fzpdamxy-ill
source root is ill
installing
Fetching /tmp/nix-build-ill-fetch.drv-0/ill to /nix/store/dy1dywfq2mh035z4v0phmx0kg7p066cw-ill-fetch
Using rust registry from /nix/store/ri6jzyj02dw56zr5bk9yvaci6zr4g7vw-rustRegistry-2017-01-27-6a73a15
warning: custom registry support via the `registry.index` configuration is being removed, this functionality will not work in the future
mv: missing destination file operand after '/nix/store/dy1dywfq2mh035z4v0phmx0kg7p066cw-ill-fetch/registry/cache/HASH'
Try 'mv --help' for more information.
builder for ‘/nix/store/dw177b3in0rmfsx237jlzqimbjmcxrpk-ill-fetch.drv’ failed with exit code 1
cannot build derivation ‘/nix/store/c4klqbmccg501naxznl48w24hpazgdc1-ill.drv’: 1 dependencies couldn't be built
error: build of ‘/nix/store/c4klqbmccg501naxznl48w24hpazgdc1-ill.drv’ failed
I have just tested on the sample hello world that Cargo provides with cargo init, buildRustPackage was able to perform the build just fine. This has probably been fixed at some point.
Thank you for your contributions.
This has been automatically marked as stale because it has had no activity for 180 days.
If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.
Here are suggestions that might help resolve this more quickly:
Search for maintainers and people that previously touched the
related code and @ mention them in a comment.
I think this still happens. The elfcat package fails to build (from Hydra):
unpacking sources
unpacking source archive /nix/store/y61ycffrys6xjvgfhhhi8s2fidaz43ga-source
source root is source
patching sources
configuring
no configure script, doing nothing
building
There is no dependency to vendor in this project.
Traceback (most recent call last):
File "/nix/store/9cqhrbp7v53q98ly12gzpsqck1cxzqvp-cargo-vendor-normalise/bin/.cargo-vendor-normalise-wrapped", line 42, in <module>
main()
File "/nix/store/9cqhrbp7v53q98ly12gzpsqck1cxzqvp-cargo-vendor-normalise/bin/.cargo-vendor-normalise-wrapped", line 17, in main
assert list(data.keys()) == ["source"]
AssertionError
It has cargoSha256 = null so I imagine this was working earlier and then regressed.
Bisected to dc93e10. Looks like the way cargo vendor works changed between 1.58 and 1.59.
❯ rustup run 1.58.1 cargo vendor
To use vendored sources, add this to your .cargo/config.toml for this project:
[source.vendored-sources]
directory = "vendor"
❯ rustup run 1.59.0 cargo vendor
There is no dependency to vendor in this project.
Activity
fix(Cargo): Add dummy dependencies section
fix(Cargo): Add dummy dependencies section
Simple rust project with one dependency.
mmahut commentedon Aug 11, 2019
Are there any updates to this issue, please?
Deluvi commentedon Oct 31, 2019
I have just tested on the sample hello world that Cargo provides with
cargo init,buildRustPackagewas able to perform the build just fine. This has probably been fixed at some point.stale commentedon Jun 1, 2020
Thank you for your contributions.
This has been automatically marked as stale because it has had no activity for 180 days.
If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.
Here are suggestions that might help resolve this more quickly:
related code and @ mention them in a comment.
irc.freenode.net.
liff commentedon May 9, 2022
I think this still happens. The
elfcatpackage fails to build (from Hydra):It has
cargoSha256 = nullso I imagine this was working earlier and then regressed.liff commentedon May 11, 2022
Bisected to dc93e10. Looks like the way
cargo vendorworks changed between 1.58 and 1.59.The
cargo-vendor-normalisescript always expects the first kind of output.