Skip to content
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

cargo Building Wrong Package #391726

Closed
3 tasks done
Cynik-CPU opened this issue Mar 21, 2025 · 5 comments
Closed
3 tasks done

cargo Building Wrong Package #391726

Cynik-CPU opened this issue Mar 21, 2025 · 5 comments
Labels
0.kind: bug Something is broken

Comments

@Cynik-CPU
Copy link

Cynik-CPU commented Mar 21, 2025

Nixpkgs version

nix-env (Nix) 2.26.3

Describe the bug

"cargo" the Rust compiler updates into "cargo-3ds" which is a different package.

The reason why I think that this is not an issue on my end is because it's confirmed by the Nix Package Versions website.. When you look at the version numbers the latest two are from the same day, with the latest starting with "3ds" instead of "1." like the others.

Steps to reproduce

Step 1: Install cargo
Step 2: Update cargo

Expected behaviour

cargo-1.83.0 will change to cargo-3ds-0.1.3 after the update

Screenshots

No response

Relevant log output

Additional context

No response

System metadata

  • system: "x86_64-linux"
  • host os: Linux 6.13.7-arch1-1, Arch Linux, noversion, rolling
  • multi-user?: no
  • sandbox: yes
  • version: nix-env (Nix) 2.26.3
  • nixpkgs: /nix/store/bmgmgq4v4x9as2fss82fpv4xbcwgzkvj-nixpkgs/nixpkgs

Notify maintainers

@figsoda
@Mic92
@tjni
@winterqt
@zowoq


It should just be a matter of removing or replacing the cargo-3ds version, godspeed.

Note for maintainers: Please tag this issue in your pull request description. (i.e. Resolves #ISSUE.)

I assert that this issue is relevant for Nixpkgs

Is this issue important to you?

Add a 👍 reaction to issues you find important.

@Cynik-CPU Cynik-CPU added the 0.kind: bug Something is broken label Mar 21, 2025
@eclairevoyant
Copy link
Contributor

eclairevoyant commented Mar 21, 2025

What do you mean by "updates into" or "install cargo"? What steps are you taking? Share your actual code and commands.

By the way, that random website is not official, the official package listing is at https://search.nixos.org/packages. And cargo and cargo-3ds are different packages, so maybe you are confusing something here.

@Mic92
Copy link
Member

Mic92 commented Mar 21, 2025

This is an issue with https://github.com/lazamar/nix-package-versions and how it parses versions. It should group them by attribute. Please open an issue there.

@Mic92 Mic92 closed this as completed Mar 21, 2025
@taketwo
Copy link
Contributor

taketwo commented Mar 21, 2025

I'm not sure I understand what this has to do with old version parsing. I'm asking nix-env to install cargo and I get an unrelated package:

$ nix-env -i cargo
evaluation warning: CUDA versions older than 12.0 will be removed in Nixpkgs 25.05; see the 24.11 release notes for more information
evaluation warning: CUDA versions older than 12.0 will be removed in Nixpkgs 25.05; see the 24.11 release notes for more information
evaluation warning: CUDA versions older than 12.0 will be removed in Nixpkgs 25.05; see the 24.11 release notes for more information
evaluation warning: CUDA versions older than 12.0 will be removed in Nixpkgs 25.05; see the 24.11 release notes for more information
evaluation warning: CUDA versions older than 12.0 will be removed in Nixpkgs 25.05; see the 24.11 release notes for more information
evaluation warning: CUDA versions older than 12.0 will be removed in Nixpkgs 25.05; see the 24.11 release notes for more information
evaluation warning: CUDA versions older than 12.0 will be removed in Nixpkgs 25.05; see the 24.11 release notes for more information
evaluation warning: CUDA versions older than 12.0 will be removed in Nixpkgs 25.05; see the 24.11 release notes for more information
evaluation warning: CUDA versions older than 12.0 will be removed in Nixpkgs 25.05; see the 24.11 release notes for more information
evaluation warning: 'opensycl' has been renamed to 'adaptivecpp'
evaluation warning: 'opensyclWithRocm ' has been renamed to 'adaptivecppWithRocm '
evaluation warning: qt6Packages.stdenv is deprecated. Use stdenv instead.
installing 'cargo-3ds-0.1.3'
building '/nix/store/abd87kak2b5lns59j7r5rqzqr18xahll-user-environment.drv'...

@eclairevoyant
Copy link
Contributor

Well, stop using nix-env first off: https://stop-using-nix-env.privatevoid.net

And the correct command would be nix-env -iA cargo in any case to select by attribute name rather than the junk logic nix-env uses by default. (And upgrading with nix-env is broken in the way described here, which is why it's best not used.)

Development tools like cargo should be used in the context of a dev shell. You can pick between the options below:

Either way, this isn't a nixpkgs issue, just an issue of using nix-env.

@taketwo
Copy link
Contributor

taketwo commented Mar 21, 2025

Thanks for the references; very revealing for someone like me who only uses Nix as an imperative package manager to get access to more up-to-date package versions than what's available through apt get.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken
Projects
None yet
Development

No branches or pull requests

4 participants