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

Andres Loeh andres.loeh at googlemail.com
Fri Dec 19 12:56:15 CET 2008


Hi Michael,

> Obviously, we should try to avoid building just what
> we need each time and always ending up with a bunch
> of near-identical builds.

I'm sorry, but this isn't obvious to me. Granted, if it can
be avoided at no other cost, then yes, ok. But my priorities
lie elsewhere. I want a *simple model* that works with relatively
*little user interaction*.

>        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. If they're not met, you adapt on the fly,
but warn. Actually, it could be a global configuration setting to
either be silent about it, to warn, or to throw an error in such
a case, with the default for this setting being the warning ...

Cheers,
  Andres



More information about the nix-dev mailing list