not-all-packages-anymore.nix

Silvan Mosberger

Playlists: 'nixcon2023' videos starting here

For [almost 20 years now](https://github.com/nixos/nixpkgs/commit/1894a8b86c4f5233f4f28af3b93156aaaee44af1#diff-e55bb1f00549f56ee8b5e3a6977467543b29e7ddb51bd6df23bea76713fc972c), adding a new package to Nixpkgs required editing the `all-packages.nix` file, which grew to over 40000 barely-sorted lines this year. In addition, an appropriate place for your package definition had to be found in the loosely-categorised `pkgs` hierarchy. Especially with the recent growth of Nix, this has been a frequent cause of confusion for new contributors.

However, in the months leading up to NixCon, this is all changing with the acceptance of [RFC 140](https://github.com/NixOS/rfcs/pull/140), originally designed by the new [Nixpkgs Architecture Team](https://nixos.org/community/teams/nixpkgs-architecture.html). This proposal allows most new packages to be added by simply creating a new directory in the right place with a name matching the desired attribute name.

In this talk I will go over the new package contribution process, along with its limitations, historical context, interesting implementation details and future work.

Download

Embed

Share:

Tags