[Nix-dev] Re: Buildenv hook mechanism
Marc Weber
marco-oweber at gmx.de
Wed Jan 26 21:11:31 CET 2011
Excerpts from Eelco Dolstra's message of Wed Jan 26 14:28:37 +0100 2011:
> Yes, sounds reasonable. But the big question is what package should declare the
> hook. For instance, for the GTK icon cache problem, should the hook be declared
> by gtk+, or by every GTK-based package that has a share/icons directory?
Do it once or many times?
Does it hurt other packages ? No.
Can you forget doing it for new packages: Yes.
So I vote for doing it once and be done.
Ludo: I'm fine with your env hook. My env builder hook proposal was very
similar - but it allowed having different names.
Does it make sense to make the builder keep hashes of the hooks it
already has run - so that the cache is only build once if if multiple
packages include it for whatever reason then?
We're talking about two issues:
a) remove caches from $out
b) recreate cache when building user environment.
There are different implementations: Create funtions "merging" files in
user environment. In this case the merge should merge both caches.
Eventually this allows running apps from store without installing them
to env.
We should also talk about system env vs user env here.
Should the merge function take into account the system env?
Or should we patch GTK apps to use multiple caches
(NIX_USER_PROFILE_DIR) and maybe even taking into account path of
executable being run to find the $out/ cache file ?
I've no idea how much work this would be - do you ?
I agree the solution having a user env hook is better than having none.
However it appears to ignore the system envirnoment ?
Marc Weber
More information about the nix-dev
mailing list