-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Package structure #295042
Comments
@fricklerhandwerk also talked to me about cleaning up the file structure in other ways in nixpkgs, in particular things like:
|
Why though? I highly agree with the kind of profound insight someone shared at NixCon 2018 (iirc) that We'd have for example the following files
I believe this to be much more human-friendly, as everything postgres is in one place, instead of spread out across the tree. (btw, personalized release notes? heck yeah! this gets us halfway there) I'll also note that this structure is similar to a flake. Convergent evolution I'd say. Both are functional divisions as opposed to technical. We may or may not be able to exploit the similarity. One flaw perhaps is to have a large amount of files in the root of the repo. We can improve this by moving all concepts into a A functional directory layout might also help us not try to lovingly cram everything into passthru, because the derivation is not always the right functional key for everything. (inspired by NixOS/nixos-search#506 (comment)) |
@roberth I don't disagree with your proposal (and will probably need more time to let it sink in to appreciate it fully), but want to clarify that I would simply like to remove some of the noise and reduce some of the potential for confusion without changing too much. So to judge any such proposal I would apply the following measure: what is the smallest change that has a tangible impact on clarity and ease of navigation? PS: I fully agree on the |
The shorter layout is slightly easier to use. By using `package.nix` we clarify the purpose and format of the expression file, and open up to the possibility of moving towards a human-centric _functional_ tree instead of a tree based on technical features. In order words, be forwards compatible with https://github.com/nixpkgs-architecture/issues/issues/5#issuecomment-1228656788 so that that could be implemented with minimal maintenance impact.
I've checked the youtube transcripts of NixCon '18, but couldn't find it with (the non-[ ]) words like knowledge [system], expert [system], [knowledge] base, database, information [system]. Might have been a lightning talk, none of which were published. |
Hi @blaggacao, and thank you for sharing your experience. Currently we're in the process of narrowing down what to work on in the architecture team, and auto-called packages seems to be the obvious candidate. This is a lot narrower in scope, but we should be mindful of fitting it in the larger context that includes this thread. As such, I don't think we need to come up with a conceptual framework for what goes into the package directories, how that's layered, etc. This allows us to keep the initial plan simple, so that we don't have to burden the community with unnecessary terminology when propose the first changes. So for now I won't go into too much detail about the layers or other specifics, but instead rely exclusively on familiar "Nixpkgs" concepts. Your input is definitely worth circling around to when we continue this discussion.
It's relevant input. If someone disagrees with the article, we can have a discussion and learn together.
I'll note that as validation of the idea that the new directory structure should invite other files than just an callPackage-invoked package function. Thanks! |
https://discourse.nixos.org/t/nixpkgs-nixos-is-an-expert-system-database/671 |
The shorter layout is slightly easier to use. By using `package.nix` we clarify the purpose and format of the expression file, and open up to the possibility of moving towards a human-centric _functional_ tree instead of a tree based on technical features. In order words, be forwards compatible with https://github.com/nixpkgs-architecture/issues/issues/5#issuecomment-1228656788 so that that could be implemented with minimal maintenance impact.
We can consider this addressed with RFC 140 now! |
Issue description
It is hard for new package contributors to know where they should define their package, since the pkgs subdirectory is laid out fairly arbitrarily. And then there's the pseudo-sorted humongous all-packages.nix that's become unmanageable at this point.
Goal
When new contributors easily know where they can define their package.
The text was updated successfully, but these errors were encountered: