python wrapper that sets PYTHONHOME to the profile it is in
svn path=/nixpkgs/trunk/; revision=29462
This commit is contained in:
parent
8770aaea0e
commit
0c32d209ca
21
pkgs/development/interpreters/python/pythonhome-wrapper.nix
Normal file
21
pkgs/development/interpreters/python/pythonhome-wrapper.nix
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
{ stdenv }:
|
||||||
|
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
name = "pythonhome-wrapper";
|
||||||
|
|
||||||
|
unpackPhase = "true";
|
||||||
|
installPhase = ''
|
||||||
|
ensureDir $out/bin
|
||||||
|
echo '
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
BINDIR=`dirname $0`
|
||||||
|
PYTHONHOME=`dirname $BINDIR`
|
||||||
|
PYTHONHOME=`(cd $PYTHONHOME && pwd)`
|
||||||
|
export PYTHONHOME
|
||||||
|
|
||||||
|
$BINDIR/python "$@"
|
||||||
|
' > $out/bin/py
|
||||||
|
chmod +x $out/bin/py
|
||||||
|
'';
|
||||||
|
}
|
@ -2585,6 +2585,8 @@ let
|
|||||||
extraLibs = lib.attrValues python.modules;
|
extraLibs = lib.attrValues python.modules;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
pythonhomeWrapper = callPackage ../development/interpreters/python/pythonhome-wrapper.nix { };
|
||||||
|
|
||||||
pyrex = pyrex095;
|
pyrex = pyrex095;
|
||||||
|
|
||||||
pyrex095 = callPackage ../development/interpreters/pyrex/0.9.5.nix { };
|
pyrex095 = callPackage ../development/interpreters/pyrex/0.9.5.nix { };
|
||||||
|
Loading…
x
Reference in New Issue
Block a user