[Nix-dev] Usability: Nixpkg > NixOS

Profpatsch mail at profpatsch.de
Fri Dec 16 10:18:08 CET 2016


On 16-12-15 11:48pm, Judson Lester wrote:
> First, how derivations become software. I *think* nix-env (or nix-shell, or
> nix-repl) takes the derivation, finds the build script, establishes
> environment variables and runs the script, but I don't know that I've ever
> seen that in print anywhere.

nix-store --realise

> More nuanced, I've never quite been sure where
> the appropriate dividing line is between derivation and build script

The whole definition is in the nix manual in the derivation section.
For specific details you would probably need to read the nix source.

> Second, how do builds get linked into the system? I've seen it happen, and
> again I have suspicions that it has to do with the outputs attribute of the
> derivation, but I remain in the spooky darkness about particulars.

System profiles are just a derivation that is basically a link farm.
In their /bin they have a bash script that performs the actual switch.
It basically bootstraps itself.


-- 
Proudly written in Mutt with Vim on NixOS.
Q: Why is this email five sentences or less?
A: http://five.sentenc.es
May take up to five days to read your message. If it’s urgent, call me.


More information about the nix-dev mailing list