nixpkgs/pkgs/development/interpreters/python/wrapper.nix
Florian Friesdorf 09ae58fcd7 python wrapper comment
svn path=/nixpkgs/branches/stdenv-updates/; revision=32587
2012-02-26 17:23:22 +00:00

22 lines
606 B
Nix

# Create a python that knows about additional python packages via
# PYTHONPATH
{stdenv, python, makeWrapper, extraLibs ? []}:
stdenv.mkDerivation {
name = "python-${python.version}-wrapper";
propagatedBuildInputs = [python makeWrapper] ++ extraLibs;
unpackPhase = "true";
installPhase = ''
mkdir -p "$out/bin"
for prg in 2to3 idle pydoc python python-config python${python.majorVersion} python${python.majorVersion}-config smtpd.py; do
makeWrapper "$python/bin/$prg" "$out/bin/$prg" --suffix PYTHONPATH : "$PYTHONPATH"
done
'';
inherit python;
inherit (python) meta;
}