5 ms·
When it’s hard to do something in Nix, it’s really hard. Let’s say you download a random binary which isn’t part of the Nix distribution — it is unlikely that
by ywei3410 6y ago
When it’s hard to do something in Nix, it’s really hard. Let’s say you download a
random binary which isn’t part of the Nix distribution — it is unlikely that you can run
the binary; you may need to run ldd or nm to check the headers or construct the LD_LIBRARY_PATH
manually. So many random build scripts assume certain things like cp exists in /bin/cp or use
absolute paths (looking at you Python) that I tend to find I’m yak-shaving pretty often.
The documentation for Nix… is special. I’ve never seen any configuration need to explain the fixed-point [1]
in order to do something which should be pretty simple.
On the other hand, when it works, it works brilliantly. I have projects where I want to fetch some random URL,
or build some randomly generated C file; previously which I would have just said sod-it and checked it into the
repository. Being able to share crafted environments ala direnv to colleagues and the continuous-integration
is magical. Having per-project environment management which doesn’t require 3-4 tools like virtualenv, nvm,
docker, docker-compose is really nice.
[1] https://nixos.org/guides/nix-pills/nixpkgs-overriding-packages.html https://nixos.org/guides/nix-pills/nixpkgs-overriding-packag...