Notes
- Past meeting notes
- Recording
- Matrix announcement
- Recorded by: @infinisil
- Lead by: @infinisil
- Meeting notes by: @tomberek
- Present members: @infinisil @Ericson2314 @tomberek @roberth @growpotkin
intro
- @infinisil: will keep doing Matrix room pings to announce meetings
- New member: @growpotkin
Auto-called packages RFC draft review
proposal: package.nix instead of default.nix, https://github.com/nixpkgs-architecture/auto-called-packages/pull/8
-
Benefit: Can’t accidentally
nix-buildthese paths anymore- Leaves room open for a
default.nixthat can benix-build’t
- Leaves room open for a
-
- File paths are an implementation detail
- We can do extra migrations out the kindness of our heart.
- But we shoudln’t feel “boxed in” by this. If we can’t do as good of a “bonus” thing for downstream coe snooping at unstable file layouts, that’s fine.
-
@roberth: PR’s need to be rebased, lots of them
- @Ericson2314: PR’s change the implementation, is expected. Tool to automate PR rebases has a lot of flexibilities
-
zooming out, the choice is between
-
package-function/<name>- new stuff would be
foo/<name>,bar/<name>.
- new stuff would be
-
<name>/package-function- new stuff would be
<name>/foo<name>/bar-
- new stuff would be
-
-
Concretely:
- Example:
pkgs/auto/hello/package-function.nix - Example:
auto/hello/package-function.nix?
- Example:
-
@Ericson2314: directory should imply structure; avoid exceptions (+1)
- What do do with bootstrap, build-support, etc?
- What to do with fetchgit (things that are libraries are not exactly packages)
- lib?
- @tomberek: dir structure should be a close match to attr structure
- during transition will have new/old separation
-
@infinisil: Proposal: Change the RFC to only do the transition for packages, not functions like fetchers and other special values
- +1
- +1
- +1 @Ericson2314
- @tomberek: The directory structure / attribute structure mismatch is currently confusing. Might be better to keep it the same
-
might be controversial
-
@growpotkin: Could use
default.nixfor filling out non-default arguments-
@roberth: Doesn’t scale to nixpkgs’ scale. Can have
default.nixbe something like(import ../.. {}).helloinstead though -
@Ericson2314:
- Agreed we should save
default.nixfor things that are not footguns that cannot be called. A good general rule. - A bit wary about this specific default.nix, because definitions should not know their own name.
- But perhaps it is less bad because the package directories were already supposed to be 1-1 with attribute names.
- Agreed we should save
-
@roberth: Doesn’t scale to nixpkgs’ scale. Can have
File name proposals:
-
@roberth: Something with “fun”/“functions”
-
pkg-fun.nix, same length as default.nix

- +1 @Ericson2314
- +1 @infinisil
- @roberth: sounds good
- @growpotkin: Sounds good, easy for tab completions
-
Other ideas:
- package-function.nix
- package-fun.nix
- package.nix
- proto-derivation.nix
- prototype.nix
- blueprint.nix
- default.nix
- pkg.nix
-
@Ericson2314: Naming details shouldn’t block the RFC
Directory root
In nixpkgs root:
-
pkg/<name>/pkg-fun.nix -
component/<name>/pkg-fun.nix, too long -
part/<name>/pkg-fun.nix -
thing/<name>/pkg-fun.nix -
mod/<name>/pkg-fun.nix, we have modules already -
pkg/<name>/pkg-fun.nix -
comp -
uniform -
unit- +1 @infinisil
- +1 @growpotkin
- +1 @roberth
-
@Ericson2314 proposed
pkgs/unit/<name>/*.nix-
@roberth:
pkgsnot necessary. - @roberth: Implementation should include rename tool, shouldn’t do many renames manually
-
@roberth: Doesn’t make sense to move nixos modules into
pkgs- @Ericson2314: +1
- Not disagreeing with
pkgs/unit, for now only for packages
-
@roberth:
unit/<name>/*.nix- @infinisil: Just a name
- @Ericson2314: Good to think ahead, less ossifying, can change things later as well. We’re trying to think ahead, but not set in stone.
-
@growpotkin strictness is flexibility!
- @Ericson3214: +90000
- @infinisil: Encouraging more evolution
@growpotkin’s sharding experiment
- Ran into some performance issues with
readDir. - Automatically generate single file with all paths, much faster.
-
@infinisil:
builtins.listDircould be faster- @roberth: This is an implementation detail (and readDir attrValues can be made lazy)
-
@infinisil:
- 8000 nodejs packages, sharding node packages by scope + base name, plus one-letter sharding for unscoped
- @Ericson2314: Attribute union should be faster in Nix, currently linear
-
@Ericson2314: Fundamentally, we should do things like sharding because limitations in things outside our control, like the filesystem. When the implementation is in Nix itself we should just fix it.
- My guess is that sharding is good for the filesystem (and for git’s content addressing), and if Nix doesn’t like it we should fix Nix to get along with it.
- @growpotkin: Beware of case-insensitive file systems!
outcomes, todos
-
@roberth: Update Shorten the paths, rename to package.nix by roberth · Pull Request #8 · nixpkgs-architecture/simple-package-paths · GitHub
- Update PR title, doesn’t shorten paths
- Update details with file path
pkg-fun.nix- No misleading
default.nixconvention