I disagree, the nixpkgs manual is a must, but some documentation will also be in READMEs in the repo, and some best practices are outlined at https://nix.dev/ as well - you’ll want to get somewhat familiar with callPackage
. But the docs, generally, are there, even if the formatting could be improved or so on. (And if you see some opportunity for improvement feel free to send a PR.)
Not really, I’ve sent about 200 PRs to nixpkgs and I don’t know jack about the tools in the python, rust, etc. ecosystem, other than the names of the files involved (Cargo.toml, pyproject.toml, etc.)
Node is an exception, JS is just tough to package in general due to there being many kinds of tooling and lockfile formats, bugs in said tooling, the tendency for upstreams to run arbitrary commands during packaging, and the tendency for node et al to download random binaries which you then have to work around.
If you’re packaging rust, go, python, or node, you can use nix-init
in the root of a nixpkgs clone (external tool, you can use .e.g nix-shell -p nix-init
to get it in a shell, then run it) to get you started quickly. It may be helpful for other languages as well, but you just have to write a bit more afterwards, and it won’t use other language-specific builders.
Do look at other packages in nixpkgs, but do note there are some quite old standards in packaging in the nixpkgs repo, whereas the unstable manual should have the more up-to-date recommendations.
Do not use shallow or treeless clones with nixpkgs, as rebasing is the standard workflow here.
If you want to save time and disk space, fork the repo into your account, then use a blobless clone:
git clone --filter=blob:none https://github.com/YOUR-USERNAME/nixpkgs
And become familiar with git rebasing, if you aren’t.
Commit format should also be followed, generally packagename: init at 1.2.3
or packagename: 1.2.3 -> 1.2.4
or so on, as CI will actually read that and run tests accordingly.
Don’t worry about too much else, nixpkgs-review
is overkill for example; reviewers can run that if needed, and they can also provide any other necessary feedback.
Finally, if you have an idea of what to do but are stuck, send the PR anyway, reviewers can help you move it forward, or you can ask here.
PS:
this link is years outdated, don’t use this.