Four months ago, the first milestone towards RFC 140 was achieved by introducing the pkgs/by-name
directory for Nixpkgs, allowing new packages to be declared in that directory instead of the category-based file hierarchy, removing the need for all-packages.nix
in most cases. Thanks to the efforts of all the contributors and reviewers, we’ve seen the number of packages in pkgs/by-name
skyrocket to over 800!
Now’s time for the next step: Enforcing pkgs/by-name
for all new packages (where applicable)! This is implemented in the following PR:
https://github.com/NixOS/nixpkgs/pull/275539
Unless significant problems are brought up, the PR is scheduled to have its final review and merge party on Monday, 2024-01-15T16:00:00Z in this Jitsi, anybody is free to join!
Edit: Now over! While we couldn’t merge during the meeting due to a test failure in CI, I was able to fix it fairly easily.
The PR is now merged, and will take effect once the nixos-unstable
channel updates the next time!
Good to know
- Only packages using
pkgs.callPackage
need to usepkgs/by-name
, so this doesn’t apply for e.g.python3Packages.callPackage
,callPackages
(note thes
!) or package aliases. - Whether
pkgs/by-name
should be used is automatically checked by CI, so there’s no need for reviewers to think about this: If CI is green, there’s no problems withpkgs/by-name
and merging won’t break it. - This also applies to older PRs that still introduce new packages outside
pkgs/by-name
: They can still be merged as long as CI is green. CI will start failing if you push new code though, in which case it would have to be moved topkgs/by-name
. - There’s no need to migrate existing packages to
pkgs/by-name
. That will be done automatically as the next and final step of RFC 140. See also the guide on manualpkgs/by-name
migration.
Sponsoring
Finally, a huge shout-out to mainly Tweag but also newly Antithesis for sponsoring this work!