Closed infinisil closed 1 year ago
To expand on this, for packages that only have the default.nix file, why not skip putting it in it's own, otherwise empty directory. I.e. pkgs/applications/editors/ed/default.nix
would become pkgs/ed.nix
To expand on this, for packages that only have the default.nix file, why not skip putting it in it's own, otherwise empty directory. I.e.
pkgs/applications/editors/ed/default.nix
would becomepkgs/ed.nix
for consistency, it would be good if every package has a directory. that also makes it easy to add more files to the package
and if i understand the technical proposal correct, the directories are what is "auto-called", so they are needed
It could be done technically (just needs a slight adjustment to callPackage
, could even be limited to the auto-calling only), but I agree that always having a directory is better for consistency. (Let's keep this discussion to a separate issue though, it's not the same as whether auto
is needed).
I think a good long term ambition is to move to a <component>/<file-type>.nix
See https://github.com/nixpkgs-architecture/issues/issues/5#issuecomment-1228656788
If that's too radical for now, we can reduce that to
packages/<name>/called-package.nix
for auto-called ones andpackages/<name>/package.nix
for non-auto-called ones, such as pkgs: pkgs.callPackage ./auto-package { defaultArg1 = .....; }
Specifically this avoids unnecessary abbreviations and nesting.
Even if we don't decide to move NixOS modules into components/postgresql/nixos-module.nix
style locations, preparing the structure for RFC 78 would be fantastic, considering how disruptive mass-moves are.
components/p/o/postgresql/package.nix
components/p/o/postgresql/config-module.nix
(RFC 78)
Idea: Instead of having
pkgs/auto
be the auto-called directory, have it bepkgs
directly. All the bits that can't be auto-called should be put into new top-level directories. This idea was brought to attention by @davidak on Matrix