nix-build in under 100 lines
30 points by lobo
30 points by lobo
Farid has many recent foundational posts on Nix. I'm hoping he's porting store-based OSs to Buck, as part of his recent role at Meta.
I think more importantly the Nix expression language is missing.
IIUC nix-build itself doesn't need to understand Nix the language, just the derivation format. The Nix expression-to-derivation conversion is done by nix-instantiate.
At least nix-build the command line program needs to be able to do it, because you can pass it nix source files. Whether it shells out to nix-instantiate under the hood or not is an implementation detail.
I stand corrected; thanks. From the nix-build manpage:
nix-build is essentially a wrapper around nix-instantiate (to translate a high-level Nix expression to a low-level store derivation) and nix-store --realise (to build the store derivation).
I mixed up --realise with nix-build, of which the former is what the Go program implements.