Hello, "Andres Loeh" <[email protected]> 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'. _______________________________________________ nix-dev mailing list [email protected] https://mail.cs.uu.nl/mailman/listinfo/nix-dev
