[Nix-dev] nix store: hardlink vs symlink

Florian Friesdorf flo at chaoflow.net
Sat Sep 24 17:37:13 CEST 2011


On Sat, 24 Sep 2011 08:03:03 -0700, shea at shealevy.com wrote:
> It seems like the problem here is with Python, not nix. Isn't there a way
> to set some env var or command line flag to set sys.prefix manually? Then
> you can create a wrapper script to call the "real" Python with the right
> value.

Setting PYTHONHOME overrides the prefix, pythonhomeWrapper (WIP) does
that.

Having:
    pyhome = pkgs.buildEnv {
      name = "pyhome";
      paths = [
        pkgs.defaultStdenv
        pkgs.python27
        pkgs.python27Packages.simplejson
        pkgs.pythonhomeWrapper
      ];
    };

you get an environment where ./bin/py is starting a python with correct
prefix.

I'm in favor of changing the python expressions to replace all relevant
scripts (./bin/python, ./bin/pythonX.Y, maybe more) with wrapped
versions.

Are there reasons against doing so?

> Or patch Python not to follow symlinks like that.

I think we should not change that, because that's what python does and
there might be people using it. Will bring this up on python-dev.

-- 
Florian Friesdorf <flo at chaoflow.net>
  GPG FPR: 7A13 5EEE 1421 9FC2 108D  BAAF 38F8 99A3 0C45 F083
Jabber/XMPP: flo at chaoflow.net
IRC: chaoflow on freenode,ircnet,blafasel,OFTC
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
Url : http://lists.science.uu.nl/pipermail/nix-dev/attachments/20110924/5ade67c8/attachment-0001.bin 


More information about the nix-dev mailing list