forked from mirrors/nixpkgs
0c32d209ca
svn path=/nixpkgs/trunk/; revision=29462
22 lines
334 B
Nix
22 lines
334 B
Nix
{ 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
|
|
'';
|
|
}
|