Repository navigation
Closed
Labels
0.kind: bugSomething is broken2.status: stalehttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md6.topic: rustGeneral-purpose programming language emphasizing performance, type safety, and concurrency.
Description
Describe the bug
Wanted to switch the rustdesk-flutter build to the new cargo fetcher. Doesn't work.
Traceback (most recent call last):
File "/nix/store/wadx2h6yard87zgvddshm3mx2nimagwc-fetch-cargo-vendor-util/bin/fetch-cargo-vendor-util", line 293, in <module>
main()
File "/nix/store/wadx2h6yard87zgvddshm3mx2nimagwc-fetch-cargo-vendor-util/bin/fetch-cargo-vendor-util", line 289, in main
subcommand_func()
File "/nix/store/wadx2h6yard87zgvddshm3mx2nimagwc-fetch-cargo-vendor-util/bin/fetch-cargo-vendor-util", line 281, in <lambda>
"create-vendor": lambda: create_vendor(vendor_staging_dir=Path(sys.argv[2]), out_dir=Path(sys.argv[3]))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/nix/store/wadx2h6yard87zgvddshm3mx2nimagwc-fetch-cargo-vendor-util/bin/fetch-cargo-vendor-util", line 238, in create_vendor
copy_and_patch_git_crate_subtree(git_tree, pkg["name"], crate_out_dir)
File "/nix/store/wadx2h6yard87zgvddshm3mx2nimagwc-fetch-cargo-vendor-util/bin/fetch-cargo-vendor-util", line 179, in copy_and_patch_git_crate_subtree
shutil.copytree(crate_tree, crate_out_dir)
File "/nix/store/px2nj16i5gc3d4mnw5l1nclfdxhry61p-python3-3.12.7/lib/python3.12/shutil.py", line 600, in copytree
return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/nix/store/px2nj16i5gc3d4mnw5l1nclfdxhry61p-python3-3.12.7/lib/python3.12/shutil.py", line 498, in _copytree
os.makedirs(dst, exist_ok=dirs_exist_ok)
File "<frozen os>", line 225, in makedirs
FileExistsError: [Errno 17] File exists: '/nix/store/0zn7mrd3dld2dmj2fxgpjb8skx45dx1w-cargo-deps-vendor/core-foundation-sys-0.8.6'
Steps To Reproduce
Steps to reproduce the behavior:
-
cargoDeps = rustPlatform.fetchCargoVendor { inherit src; # hash fits for 1.3.3 but the problem happens on every release hash = "sha256-K9E2x01Y2WU0DewwKWXtnE92Jw2+uJOBUopHLvNs8Ew="; };
nix-build
Expected behavior
It works
Screenshots
Pretty much the text from above but rendered in my terminal
Additional context
Don't know how the clownish developers were able to misuse their cargo so much but they somehow created a lock file with duplicate entries:
- https://github.com/rustdesk/rustdesk/blob/1.3.3/Cargo.lock#L1195
- https://github.com/rustdesk/rustdesk/blob/1.3.3/Cargo.lock#L1201
They don't seem to be aware of that and cargo seems to be fine with it.
Metadata
Notify maintainers
Note for maintainers: Please tag this issue in your PR.
Add a 👍 reaction to issues you find important.
Reacted by dotlambda, Wroclaw and Sirius902
Metadata
Metadata
Assignees
Labels
0.kind: bugSomething is broken2.status: stalehttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md6.topic: rustGeneral-purpose programming language emphasizing performance, type safety, and concurrency.
Activity
TomaSajt commentedon Nov 26, 2024
What's funny is that not even
cargo vendor(the official vendor implementation) can handle this:TomaSajt commentedon Nov 26, 2024
Doing something like #282798 should be possible
gepbird commentedon Feb 11, 2025
For now a patch to the lock file was added to work around this: https://github.com/NixOS/nixpkgs/blob/19224425817fb5368492bea791c7f434c6d2422c/pkgs/by-name/ru/rustdesk-flutter/update-cargo-lock.patch
[-]fetchCargoVendor not working for rustdesk-flutter[/-][+]fetchCargoVendor fails for duplicate versions of same crate[/+]FliegendeWurst commentedon Mar 23, 2025
This also affects https://github.com/mediar-ai/screenpipe
dotlambda commentedon Mar 23, 2025
... and https://github.com/deltachat/deltachat-desktop
TomaSajt commentedon Mar 23, 2025
TomaSajt commentedon Mar 23, 2025
Could you share which dependency is duplicated?
dotlambda commentedon Mar 23, 2025
TomaSajt commentedon Mar 23, 2025
Ah, I see. It's both an electron app and a tauri app, but it is currently packaged as an electron app. I'm assuming building the tauri app would be better, but you aren't able to due to the duplication.
dotlambda commentedon Mar 23, 2025
It's not better yet because the electron version is more stable. But I wanted to package the tauri version as a second option. I will try again on top of your PR.
TomaSajt commentedon Mar 24, 2025
Also affects
oxide-rs(currently has a patch)
(the latest version no longer has duplication)
nixos-discourse commentedon Jun 7, 2025
This issue has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/i-cant-build-rust-package-because-the-vendor-is-copied-twice-which-casuses-an-error/65095/4
elzorrorebelde commentedon Jun 11, 2025
I get this error when the source code of a dependency is used twice, i.e.:
TomaSajt commentedon Feb 21, 2026
Closed via #387337 (merged into staging)
See https://nixpk.gs/pr-tracker.html?pr=387337 for progress towards reaching master.