2022-11-21 Nixpkgs Architecture Team Meeting #18

Nixpkgs Architecture Team Meeting #18

Notes

3 Likes

“Dash gang rise up - let the pinky rest!”

For too long we have suffered under the oppressive yolk on the shift modifier - no more!

2 Likes

Why would we need to pad the prefix?

Without padding the distinction between the shard directory and the package directory gets less obvious.

You could do it either way, one of these looks more pleasing than the other in my opinion, but for those who thumb their noses at aesthetics: if you don’t pad you get singleton packages like jq under ./auto/jq/jq/default.nix or /auto/u/u/default.nix and people will PR ./auto/xz/default.nix or ./auto/emacs/emacs/default.nix. Stale bot picks it up a few months after they get “please PR again with the right name: ./auto/xz/xz/default.nix and ./auto/emac/emacs/default.nix” and never get around to it.

It is somewhat clearer to readers and contributors that ./auto/xz--/xz/default.nix and ./auto/u---/u/default.nix have a rule : “4 character prefix, pad with dashes”, where ./auto/foo/foo/default.nix ./auto/u/u/default.nix, ./auto/fizz/fizz/default.nix, ./auto/emac/emacs/default.nix is a mystery.

Globs of constant length are also harder to botch in scripts in my experience.

But you’re right that ./auto/xz--/xz/default.nix is equivalent to ./auto/xz/xz/default.nix in terms of utility ( 16 precious bits are a shame to waste after all ).

Let’s continue the discussion in Sharding and other updates by infinisil · Pull Request #20 · nixpkgs-architecture/simple-package-paths · GitHub

FYI you need to hold shift on a Germany keyboard for /, too.

I don’t see how that would handle name collisions which we certainly have.

What name collisions?

If we would convert paths like

pkgs/development/libraries/abcde
pkgs/applications/misc/abcde
pkgs/development/python-modules/abcde

then they would all collide in pkgs/auto/abcde

1 Like

The attribute name is used for the new directory name, so pkgs.abcde would be in pkgs/unit/abcd/abcde. The file where abcde was defined previously has no effect on the new location.

So pkgs.python3Packages.abcde and pkgs.abcde are put in different directories?

Only toplevel packages, no other package sets. You can read about all the details here: GitHub - nixpkgs-architecture/simple-package-paths: Nix RFC draft for auto-calling packages in nixpkgs

And Sharding and other updates by infinisil · Pull Request #20 · nixpkgs-architecture/simple-package-paths · GitHub contains some recently discussed changes

A post was split to a new topic: Why did commit volume drop in May?