6 ms·
nixpkgs doesn't use requirements.txt for whatever reason. (That reason probably being the utter brokenness and braindead state of Python packaging; Node packag
by otabdeveloper4 3y ago
nixpkgs doesn't use requirements.txt for whatever reason.
(That reason probably being the utter brokenness and braindead state of Python packaging; Node packages work much better.)
- the_gipsy 3y agoYou can package simple python projects, but as soon as there are too many huge deoendecies that use CPython and whatnot, it becomes impossible to generate the nix derivation. I just use imperative python-venv + pip install on those.
- goodpoint 3y agoWasn't Nix supposed to solve these problems?
- Filligree 3y agoAnd it does, for most languages. Python seems more difficult than average.
- the_gipsy 3y agoYea python is the exception. Go, rust, nodejs, have been easy to get running with specific versions and dev envs .
- goodpoint 3y ago...and yet there's tons of Python packaged in traditional distributions including Django. Nix promises to solve exactly this problem... so it's not clear what the real benefit of Nix is. EDIT: a rain of silent downvotes?
- the_gipsy 3y agoNix hasn't been a benefit when working with python for me, but again, python is the outlier. It has been a benefit for projects in other languages. I guess the reason is because python packaging/tooling varies wildly between projects, and there are a lot of bindings. BTW a colleague was setting up the python project on a non-nix machine, and also had problems with dependencies, and ultimately had to do some nasty workarounds (disabling deps/features). To me, it seems endemic.
- earthling8118 3y agoThere's plenty of python packaged in nixpkgs too. It doesn't mean that it isn't a dumpster fire disaster. Dealing with it has been trouble with every other distro I've used. It isn't just a nix problem. If anything I think the situation is improved.
- kaba0 3y agoIt does. Nix can package everything properly. What is depending on the language ecosystem in question is whether this packaging can be more automized or not. Python is not trivially automatized with Nix.
- lloeki 3y agoTake a look at Home Assistant to see a complex python app being packaged in Nix. (disclaimer: it's still rough but it does work) https://github.com/NixOS/nixpkgs/tree/master/pkgs/servers/home-assistant https://github.com/NixOS/nixpkgs/tree/master/pkgs/servers/ho...
- SuperSandro2000 3y ago> I just use imperative python-venv + pip install on those. The whole point of NixOS is to manage this and to get rid of those manual steps that are error prone.
- the_gipsy 3y agoI only do this on some work project that I don't touch often, as an escape hatch. Everything else is managed by nix.
- otabdeveloper4 3y agoIt doesn't, but you need to ditch requirements.txt and just overridePythonPackage with the correct github revision hash. It's a PITA but unlike pip and conda it's 100% reliable.
- awegio 3y ago> Node packages work much better Are you sure about that? I haven't seen a node app built from source on nixpkgs yet. That includes Electron apps like Signal Desktop, which is a bit disappointing. There is this article about trying to package jQuery on Guix: http://dustycloud.org/blog/javascript-packaging-dystopia/ http://dustycloud.org/blog/javascript-packaging-dystopia/
- otabdeveloper4 3y agoYes, buildNpmPackage works great.
- rekado 3y agoGuix has several different npm importers (none of them merged), but it's debatable whether it is desirable to build npm packages from source when it either creates thousands of barely useful packages.
- misterio7 3y agoGrep nixpkgs for `buildNpmPackage`, it's ridiculously easy to package a node app nowadays.