Live data from Hacker News

Making a PR to Nixpkgs

johns.codes

21–22 of 22 posts

Re: Making a PR to Nixpkgs

#21

Earlier quoted context omitted.

Yea I think the main issue holding nix back is lack of documentation/standards on how to do things. Like the other commenter mentioned how npmlock2nix exists but it's hard to figure out that these tools exists. Im hoping that flakes help solve alot of problems to make it easier for users to jump in. Then hopefully the documentation problem will naturally start going away as more people start using nix.

Bad or missing documentation on Nix is a known issue. I think a big part of this issue is that the language itself doesn't have a mechanism to provide documentation. Python has docstrings, Java has javadoc, Hare has haredoc, Lua has emmylua... etc. Every language has SOME WAY of leaving explanation on what a function does, and what values it takes. Nix doesn't seem to have such a thing (if it does, it's a well-kept s…

It sort of does for modules [1] but not functions iirc.

[1] https://nixos.wiki/wiki/Declaration

Re: Making a PR to Nixpkgs

#22

NixOS is the most daunting Linux distribution ever, and all the people I know that use it are extremely smart. You need to develop a really good mental model of how this complicated web of Nix scripts works, to create packages.

I think that is being developed by people who are too smart is the problem. There's no KISS. They're fine with very complicated solution, because they seem easy to them. We not-so-smart developers tend to go for the simplest solution possible (but usually, no simpler).

The reason it is sort of complex is simply the fact that the problem domain is complex. I don’t think there is a big deal of accidental complexity around nix, it is mostly just essential, which can’t be reduced.

The same is true of the often bashed systemd - system boot is a hard problem, it gives a correct solution over incomplete but simple ones, and thus it will be more complex. But some complexity is inherent, so we just have to deal with that. (Rust could be another example - correct manual memory management necessities some added complexity )

Post reply on HN