←back to thread

Nix Derivation Madness

(fzakaria.com)
184 points birdculture | 4 comments | | HN request time: 0.001s | source
Show context
amelius ◴[] No.45774752[source]
> The road to Nix enlightenment is no joke and full of dragons.

Nix was a great research project. Now is the time to rewrite it from the ground up.

replies(5): >>45774789 #>>45774922 #>>45775360 #>>45775376 #>>45776285 #
jbstack ◴[] No.45774922[source]
Well, there's Guix as an alternative if you want a similar concept but different implementation philosophy. For me the major disadvantage of Guix is lack of package availability compared to Nix.
replies(3): >>45774938 #>>45777192 #>>45791275 #
1. amelius ◴[] No.45774938[source]
Isn't there a way to transpile the scripts from Nix to Guix?
replies(4): >>45776335 #>>45776527 #>>45778708 #>>45778936 #
2. Y_Y ◴[] No.45776335[source]
It's not to hard to translate manually, but since the dependency tree is massive it doesn't seem feasible to do wholesale.
3. c0balt ◴[] No.45778708[source]
That would be possible. The main problem there is that nixpkgs, the package repository one would want to translate, uses a good chunk of specialized build infrastructure (parts in nix, some in rust/Perl/Python) that is designed for nix (the package manger).

Some other semi-specific parts, like stdenv bootstrapping, are also a bit more complex than just some nix build instructions.

4. brendyn ◴[] No.45778936[source]
In practicing no because in the end it generally takes a human intelligence to fully understand the requirements of a particular program, sanity check everything, get the right dependency versions and fix build errors. For code library repositories like rust, importing is fairy automated since everything is neat, tidy, and regular. But end user applications are more often than not a pain in the ass