milahu / nixpkgs

Nix Packages collection
MIT License
0 stars 0 forks source link

nix-init: Failed to generate lock file to Cargo.lock #62

Open milahu opened 2 weeks ago

milahu commented 2 weeks ago

nix-init fails on cratetorrent - last commit 2021

$ nix-init pkgs/applications/networking/p2p/cratetorrent/default.nix --url https://github.com/vimpunk/cratetorrent
Enter tag or revision (defaults to 34aa13835872a14f00d4a334483afff79181999f)
❯ 34aa13835872a14f00d4a334483afff79181999f
Enter version
❯ unstable-2021-12-19
Enter pname
❯ cratetorrent
How should this package be built?
❯ buildRustPackage - cargoLock
    Updating crates.io index
2024-06-17T08:46:13.900875Z ERROR nix_init::lang::rust: Failed to generate lock file to pkgs/applications/networking/p2p/cratetorrent/Cargo.lock

cratetorrent is broken: https://github.com/vimpunk/cratetorrent/issues/115

It might be worth upgrading to bitvec to 1.0

at least nix-init should print the full error message

$ git clone --depth=1 https://github.com/vimpunk/cratetorrent
$ cd cratetorrent
$ cargo generate-lockfile
    Updating crates.io index
error: failed to select a version for the requirement `funty = "~1.2"`
candidate versions found which didn't match: 3.0.0-rc2, 3.0.0-rc1, 2.0.0, ...
location searched: crates.io index
required by package `bitvec v0.22.0`
    ... which satisfies dependency `bitvec = "^0.22"` of package `cratetorrent v0.2.0 (/run/user/1000/tmp.7NV0nb4Jpt/cratetorrent/cratetorrent)`
    ... which satisfies path dependency `cratetorrent` of package `cratetorrent-cli v0.2.0 (/run/user/1000/tmp.7NV0nb4Jpt/cratetorrent/cratetorrent-cli)`
if you are looking for the prerelease package it needs to be specified explicitly
    funty = { version = "3.0.0-rc2" }
perhaps a crate was updated and forgotten to be re-vendored?