nixpkgs/pkgs/development/interpreters/python/pythonhome-wrapper.nix
Eelco Dolstra c556a6ea46 * "ensureDir" -> "mkdir -p". "ensureDir" is a rather pointless
function, so obsolete it.

svn path=/nixpkgs/branches/stdenv-updates/; revision=31644
2012-01-18 20:16:00 +00:00

21 lines
333 B
Nix

{ stdenv }:
stdenv.mkDerivation {
name = "pythonhome-wrapper";
unpackPhase = "true";
installPhase = ''
mkdir -p $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
'';
}