2011-09-23 19:00:13 +02:00
|
|
|
{ stdenv }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "pythonhome-wrapper";
|
|
|
|
|
|
|
|
unpackPhase = "true";
|
|
|
|
installPhase = ''
|
2012-01-18 21:16:00 +01:00
|
|
|
mkdir -p $out/bin
|
2011-09-23 19:00:13 +02:00
|
|
|
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
|
|
|
|
'';
|
|
|
|
}
|