[Nix-dev] Re: `guile-1.6.7' fails to build
Eelco Dolstra
eelco at cs.uu.nl
Mon Oct 15 13:59:06 CEST 2007
Hi,
Ludovic Courtès wrote:
>> You are right, nix isn't totally pure.
>> Eg a lot of package do contain optimizations for different processors.
>> These settings are set to [autodetect] by the configure script at many
>> packages.
>
> Speaking of this, how does Nix ensure that `configure' scripts won't
> discover things (programs, libraries, C include files, etc.) outside the
> Nix store?
Nix itself doesn't do anything to prevent this (it can't --- not without tricks
like doing the build in a chroot, which would be nice to have but are less
portable). However, in Nixpkgs there a bunch of tricks to prevent "impurities".
For instance, GCC and ld are patched to not search in standard locations like
/usr/include, and the gcc-wrapper script barfs if you pass it a path outside of
the Nix store or the build's temporary directory. And of course the environment
is cleared to prevent search paths like $PATH from affecting the builder.
But we can't stop a configure script from finding (say) /usr/bin/perl and
calling it. This is in fact one of the reasons why we made NixOS --- there is
no /usr/bin/perl, so configure can't find it ;-) (The build farm that produces
our releases runs on NixOS, so if channel packages have hidden dependencies on
files outside /nix/store, the build farm will reveal this.)
--
Eelco Dolstra | http://www.cs.uu.nl/~eelco
More information about the nix-dev
mailing list