[Nix-dev] Re: $out/ENV?

Yury G. Kudryashov urkud+nix at ya.ru
Sat Jun 5 07:44:01 CEST 2010


Marc Weber wrote:

> Now we could replace the buildenv.pl script by
> 
>   {
>     for i in $paths; do
>       cat $i/ENV
>     done
>   } >> $out/ENV
> 
> Thus: we don't have to create 10.000 symlinks. we could concatenate all
> ENV files. In your .bashrc you could source it and be done.
I object. The main problems with KDE on NixOS is that KDE stores some 
/nix/store/... paths to ~/.kde/share/... With all file symlinked to 
/var/run/..., we can patch KDE to not resolve paths, and store /var/run/... 
This will survive after upgrade.

I propose another solution:

1. $perl/etc/env.d/perl sets some variable that tells us "we want PERL5LIB 
variable that aggregates $out/lib/perl5/site_perl for all needed outputs"
2. In build environment, we source all $dependency/etc/env.d/*, then 
aggregate all needed variables for all dependencies.
3. In user env, we source all $profile/etc/env.d/*, then aggregate all 
needed variables for all profiles.
> You can choose whether to source your ENV file only or the system ENV
> file as well. In other words: You can merge envs on the fly:
> 
> . ~joe/.nix-profile/ENV
> . ~marc/.nix-profile/ENV
> . ~other-user/.nix-profile/ENV
Not useful until you can unload ENV.





More information about the nix-dev mailing list