Hacker News new | past | comments | ask | show | jobs | submit login

As a Nix user, Guix interests me but I have three concerns, namely my pain points with Nix:

1. Small package base.

My workflow includes running Julia on CUDA, editing from VS Code. Remarkably, Guix has both Julia and (on a third-party PKG repo) CUDA. What it's missing is VS Code. I understand that VS Code is non-free (like Chrome, it attaches trademarks on its branding), but there's no VS Codium I could find either. I also can't find Atom. Am I missing something?

2. Package index mirroring.

Nix has an issue where Python, Node and other "third-party" packages have to be manually added to nixpkgs. If you want celery or requests, you're in luck because those are popular. If you want something more obscure, like pywikibot, you have to add it yourself (or run pip/npm yourself, and forego the benefits of Nix/Guix.) Does Guix address this?

3. Ease of scripting.

This might be a plus for Guix, since Nix design patterns are arcane (the language is easy, things like overrides and needing to replace broken URLs is hard), but how easy is it to debug failing builds? Is there something like a debugger, or at least a way to shell-in and call things yourself?

Bonus #4: broken URLs. is there a cache? what can be done?




The solution to Python packages is the 'pypi2nix' tool. This is an alternate approach that you see also used in the blog post, this time with vgo2nix. These tools take a set of dependencies (e.g. requirements.txt) and generate Nix expressions to build all of them from source.


You may also want to take a look at https://github.com/nix-community/poetry2nix

Disclaimer: I am the author (and also the author of vgo2nix).


Guix has `guix import pypi PACKAGE`, which spits out a complete definition that you can pop into a file or the main Guix repository.

'guix import' also takes a --recursive argument, which makes it recursively consider any dependencies and produce package definitions for those not already available.


For #4, Guix integrates with the Software Heritage archive[0] and will look there if the upstream server is unavailable.

The CI servers also act like content-addressed mirrors, so in practice you won't notice when the upstream disappears.

[0] https://www.softwareheritage.org/


I don't think you can get away from explicit package mirroring without compromising having a nixpkgs pinned to a rev.

Luckily it's pretty automatable and painless if your language has a decent packaging syste - the way Hackage is mirrored is very nice and automated. And then you can just ask for "vector version X.Y.Z" and if that version is there (probably is if nixpkgs is recent and the library is on Hackage), it finds it. And if you don't want to wait for nixpkgs to maintain the Hackage hashes, you can pretty easily maintain it yourself.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: