[Nix-dev] Symlinked nix store vs. enforced purity
David Soergel
dev at davidsoergel.com
Thu Jun 24 11:10:34 CEST 2010
Hi,
I'm trying to use a symlinked nix store, for reasons that I won't get into (but trust me, I know what I'm doing). I've got NIX_IGNORE_SYMLINK_STORE set to allow it.
However: in the course of building nixpkgs packages, some dependency paths get canonicalized. As a result, NIX_ENFORCE_PURITY kicks in-- e.g., it's turned on in stdenv/linux/default.nix (and other places), and then build-support/gcc-wrapper/ld_wrapper.sh and similar scripts enforce it. That is, the stdenv setup refuses to link to paths outside the nix store. This guarantees that builds will fail if the nix store is symlinked.
I realize that, if I got the build to succeed, it would have a retained dependency to some seemingly impure path. But since that path is actually inside the real location of my nix store, I'm OK with that. If I moved the store and pointed the symlink at the new location, then things would break, but I'm not going to do that.
I guess I can just hack nixpkgs to leave NIX_ENFORCE_PURITY=0 throughout. But, is there a better way? If not, then what's the point of NIX_IGNORE_SYMLINK_STORE?
Thanks for any insights,
-ds
_______________________________________________________
David Soergel (650) 303-5324
dev at davidsoergel.com http://www.davidsoergel.com
_______________________________________________________
More information about the nix-dev
mailing list