[Nix-dev] Buildenv hook mechanism

Marc Weber marco-oweber at gmx.de
Wed Jan 26 00:04:40 CET 2011


Excerpts from Vladimír Čunát's message of Tue Jan 25 22:10:29 +0100 2011:
> add it to the fixup phase of the generic builder. It isn't modular,
> but I don't think it matters in this case.
Have a look at the hooks mechanism in the default builder:
envHooks. You can add an envHook in the gtk derivation adding a
postPhase doing the setup. This should not interfere too much with other
stuff.

I'm not sure whether Michael Raskins configurable builder is used for
building gtk packages.
Have a look at: pkgs/build-support/builder-defs/builder-defs.nix
The issue is that you can't say "run last" (AFAIK). You con only say run
before another phase.
 
> I've also been confused from the fact that there are two environment builders.
> nix/corepkgs/buildenv/builder.pl.in is used by nix for user
> [...]
Its documented "eventually merge back .." or such.


By the way: I wrote a patch which could be used long time ago:
http://article.gmane.org/gmane.linux.distributions.nixos/1938/match=builder+marc+post+install

You could  pull the script into the env so that it's run using
$out/nix-support/propagated-build-inputs or such.

If you are at it consider applying the patch to builder.pl which fixes a
small issue which only occurs if all derivations only contain
files some levels deep in $out. (attached)

Lluís Batlle reported this issue once to me by irc.

HTH
Marc Weber
-------------- next part --------------
A non-text attachment was scrubbed...
Name: builder.pl.patch
Type: application/octet-stream
Size: 1017 bytes
Desc: not available
Url : http://lists.science.uu.nl/pipermail/nix-dev/attachments/20110126/1abe5f16/attachment.obj 


More information about the nix-dev mailing list