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

name should be package name, not store path name #295034

Open
roberth opened this issue Mar 6, 2023 · 1 comment
Open

name should be package name, not store path name #295034

roberth opened this issue Mar 6, 2023 · 1 comment
Labels
architecture Relating to code and API architecture of Nixpkgs

Comments

@roberth
Copy link
Member

roberth commented Mar 6, 2023

Issue description

The name part of a store path an extra suffix that's human readable, unlike the rest of the path.
We use it to convey the package name, and usually the version as well.

However, because we tend to include the version as well, this means that in general, the package name is not equal to the store path name.

Currently the .name attribute of the package attribute set contains the store path name. This is surprising.

Goal

  • Make pkg.name contain the package name and nothing else
  • Make pname a mkDerivation implementation detail
  • Stretch goal: remove the need for pname; allow name and version to be specified, in such a way that they match the package attributes and the version gets added to the store path.
  • Clean up the package attribute set ahead of RFC 92 packages and multi-derivation packages (e.g. split output build)

Refs

@jtojnar
Copy link
Member

jtojnar commented Mar 6, 2023

Do we even need to have a package name for anything other then legacy commands like nix-env? Why not just use the attribute path as the canonical package name?

We do need something to base the store path on (as a convenience when looking at store entries) but keeping the name an opaque string with no codified relation to package/project name will be sufficient for that.

@infinisil infinisil transferred this issue from nixpkgs-architecture/issues Mar 11, 2024
@infinisil infinisil added the architecture Relating to code and API architecture of Nixpkgs label Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
architecture Relating to code and API architecture of Nixpkgs
Projects
None yet
Development

No branches or pull requests

3 participants