[Nix-dev] Re: warning if trying to install a package but it fails an assert.

Ludovic Courtès ludo at gnu.org
Fri Dec 19 14:09:06 CET 2008


Hello,

"Andres Loeh" <andres.loeh at googlemail.com>
writes:

>>        We can already have .passthru.function in any package that needs it. So
>> it looks reasonable to use the following tactics:
>>        1. check needed flags
>>        2a. if everything needed is present in the passed package, use what is
>> provided
>>        2b. if something is missing, warn the user (now it's user's decision
>> whether reduced RAM/HDD usage is worth tuning configuration), add needed
>> flags and build the dependency using .passthru.function
>
> Independently of .passthru.function, this sounds like a good plan
> to me. You check your required flags against defaults. If they're
> met, you reuse the default.

How would you achieve that?  In the example of Git, does that mean you
would pass to the Git expression both a `makeSubversion' function *and*
a "default" `subversion' derivation?

It seems much easier to just pass Git a `subversion' derivation that has
Perl bindings.  It will be evaluated lazily, so if it's already there,
it's reused, otherwise it's actually built.  The user can check whether
there's reuse using "nix-env --dry-run -i git" and checking whether a
new `subversion' derivation would be built.

Thanks,
Ludo'.




More information about the nix-dev mailing list