[Nix-dev] transition to pure system

Lluís Batlle i Rossell viriketo at gmail.com
Wed Jan 5 00:51:08 CET 2011


On Tue, Jan 04, 2011 at 09:54:26PM +0100, Florian Friesdorf wrote:
> On Tue, Jan 04, 2011 at 06:20:50PM +0100, Vladimír Čunát wrote:
> > Hello.
> > > Is somewhere documented what needs to be done in order to have one
> > > profile serve as /usr, apart from just linking it.
> > I don't think there is anything else you need to do. Just create a
> > profile for this purpose and symlink it from /usr. The pure packages
> > shouldn't be affected by this.
> 
> Good to hear that it won't affect pure packages.
> 
> But, sadly, it is not enough: In nixos there are no environment
> varibales set for compilation that would point to the "correct" non-pure
> locations.
> 
> For me, just running ldconfig already raises an error:
> $ which ldconfig
> /var/run/current-system/sw/sbin/ldconfig
ldconfig comes with glibc, but in nix we don't use the ld cache at all. It is
not meant to work. at all.

> I am not deep enough into LD_LIBRARY_PATH, LDFLAGS, CFLAGS to know what
> to set. Will now read up what needs to be done.

The gcc wrappers are going to take away any reference to /usr. We don't expect
people to use gcc without the wrappers (meant for nix building), and those
wrappers take out /usr references.
Please read the wrappers to understand what you can set in variables,
like Michael Raskin advised with his 'exports'.
You can also read the wrapper by: less `which gcc`.

Good luck!



More information about the nix-dev mailing list