News for hackers. Stuff that matters.
Re:Making a PR to Nixpkgs by yewenjie on Tuesday August 02, 2022 @03:18AM (#32315980)
While I really love nix and nixos, I must say that Nixpkgs development is just out of control. There are over 5k issues and almost 4k PRs open. Reviewers are far fewer in number than contributors and there are multiple instances of low-quality packaging. Some features that most beginners want (for example, easily packaging nodejs programs) are still not there. Lack of standard is a heavy issue and there are many ways of doing the same.
Re:Making a PR to Nixpkgs by Avamander on Tuesday August 02, 2022 @07:43AM (#32317415)
> Lack of standard is a heavy issue and there are many ways of doing the same.

I'd partially blame the software as well. You can't standardise what doesn't want to follow standards. A lot of software or their developers work against the Nix model, some do so actively. The most visible example is the XDG-BD standard (https://wiki.archlinux.org/title/XDG_Base_Directory), but there are a bunch of other things like that which make packaging difficult.

Re:Making a PR to Nixpkgs by jrmurray on Tuesday August 02, 2022 @07:31AM (#32317329)
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.

Re:Making a PR to Nixpkgs by rgoulter on Tuesday August 02, 2022 @07:54AM (#32317478)
From the 2022 Nix Survey's results: https://discourse.nixos.org/t/2022-nix-survey-results/18983

The main pain points people identified:

- Getting started with Nix is hard.

- The documentation isn't great for getting started, for getting some task done, and is spread across many places.

- Debugging bad Nix code is hard.

- Contributing back to Nix is hard.

Despite the above, I think most of the respondents had just started using Nix within the last year or two.

I think some of the Summer of Nix effort is towards improving documentation. e.g. https://discourse.nixos.org/t/summer-of-nix-documentation-st...

Re:Making a PR to Nixpkgs by WhyNotHugo on Tuesday August 02, 2022 @09:52AM (#32318464)
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 secret!).

Functions being lazy doesn't help, since that makes it very hard for tools to provide feedback without actually executing the right codepaths. And finding the definition of a function is HARD.

Re:Making a PR to Nixpkgs by ywei3410 on Tuesday August 02, 2022 @11:49AM (#32320209)
It sort of does for modules [1] but not functions iirc.

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

Re:Making a PR to Nixpkgs by achooie on Tuesday August 02, 2022 @04:07AM (#32316214)
I agree with what you’re saying, but I have to say that using `npmlock2nix` was really easy. Things are changing and improving all the time, which is good but also creates these sorts of problems.