[Nix-dev] iproute nix-expression

Eelco Dolstra eelco at cs.uu.nl
Wed Jun 13 21:54:47 CEST 2007


Hi,

Michael Raskin wrote:

> ifconfig lacks ipv6 in NixPkgs and in general there are claims that
> iproute2 obsoletes ifconfig on the net.. So I propose a nix-expression
> for it to include aside with net-tools. Tested with fresh package
> collection as the parameter.

>   preBuild = "sed -e 's@^SBINDIR=.*@SBINDIR=\$(out)/sbin@' -i Makefile ; " +

Wow, I didn't know the -i flag in sed.  You learn something new every day :-)

But rather than doing a substitution on the Makefile, you can also do this by
passing a parameter to make, like

preBuild = "
  makeFlagsArray=(SBINDIR=$out/sbin CONFDIR=$out/etc ...)
";

This is less sensitive to changes in the Makefile between releases.

-- 
Eelco Dolstra | http://www.cs.uu.nl/~eelco



More information about the nix-dev mailing list