[Nix-dev] Package depends on other package options

Nicolas Pierron nicolas.b.pierron at gmail.com
Sun Jan 27 20:37:13 CET 2008


On Jan 27, 2008 7:30 PM, Michael Raskin <7c6f434c at mail.ru> wrote:
> Nicolas Pierron wrote:
> > ...
>
> Look, for example at sumArgs/selectVersion-style packages.
> You can define bare function, create/add/change defaults by passing
> attrSets (you can both add and override, of course), and then pass null
> to finally get a derivation. So you can import expression and create a
> function; add default arguments and call it some other function; and
> provide a ready package. Look at ltrace - how it uses alternate elfutils
> version; or at atheros and how I use it in configuration.nix
> (configurations trunk in trace)
> I will think about option-passing support in
> template-composing+config.nix ..
>

Ho ...,

I have not realized that sumArgs already do it by applying the
function at the end of the concatenations.

So in this case I just have to make a "swigFun" with the default
option and inherit it in the arguments of subversion which patches
"swig" by calling the "swigFun" function with the set of options and
terminating the call with "null" to build the derivation.

It seems to be simple compare to what I have suggested.

-- 
Nicolas Pierron



More information about the nix-dev mailing list