Open
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.