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