[Nix-dev] [Nix-commits] SVN commit: nix - r31230 - in nix/branches/multiple-outputs-sandbox: corepkgs src/libexpr

Eelco Dolstra e.dolstra at tudelft.nl
Tue Jan 3 17:25:44 CET 2012


On 03/01/12 17:06, Shea Levy wrote:

>> * Move the implementation of the ‘derivation’ primop into a separate
>>    file.
> 
> Snip
> 
>> +    mkThunk_(v, parseExprFromFile(findFile("nix/derivation.nix")));
>>       addConstant("derivation", v);
>>
> 
> I'm no expert on performance issues, but couldn't adding an extra file read for
> each evaluation of the derivation function have some bad consequences compared
> to having the string stored in the binary itself?

It's read exactly once per Nix invocation so there shouldn't be a problem.

Fun fact: this makes it possible to override the derivation primop by setting
$NIX_PATH to something like "nix/derivation.nix=my-derivation.nix" :-)

-- 
Eelco Dolstra | http://www.st.ewi.tudelft.nl/~dolstra/


More information about the nix-dev mailing list