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

Inconsistent package versioning #295045

Open
infinisil opened this issue Jul 18, 2022 · 3 comments
Open

Inconsistent package versioning #295045

infinisil opened this issue Jul 18, 2022 · 3 comments
Labels
architecture Relating to code and API architecture of Nixpkgs

Comments

@infinisil
Copy link
Member

Issue description

If multiple versions of a package are required, the convention is to introduce additional top-level attributes reflecting the alternation in their name, such as python2, ffmpeg-full, firefox-esr, haskellPackages.aeson_1_5_6_0. This is problematic because the attributes are not discoverable, follow no shared convention and they make overrides more problematic. Additionally there is a desire to be able to refer to specific versions of packages

Goal

When there is a consistent way to access specific versions in nixpkgs

@aameen-tulip
Copy link

Two package-set version key approaches I used were:
pkgs.someScope.foo.v1_0_1 ( "group-by" ) and pkgs."someScope/foo/1.0.01" ( "pkg-keys" ) were two patterns I had used. pkg-keys were easier to mapAttrs over; but in a REPL having to quote sucks.
In both cases I made aliases pkgs.foo an alias of a marked "default" ( usually latest ) of the fully qualified name.
For aliasing the "group-by" form was sort of problematic ( I kept botching overlays because of the multiple sub-scopes ).

@AndersonTorres
Copy link
Member

Related?

NixOS/rfcs#107

@FRidh
Copy link
Member

FRidh commented Oct 24, 2022

Related?

NixOS/rfcs#107

There is both the version attribute and the attribute name to consider.

In Nixpkgs Python packages set the guideline is that attributes names have to be lowercase and can have dashes. To indicate a variant an underscore should be used between the original attribute name and the variant suffix. Note this isn't used throughout yet.

@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

4 participants