3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/interpreters/python/wrapper.nix

24 lines
753 B
Nix
Raw Normal View History

# Create a python that knows about additional python packages via
# PYTHONPATH
{ stdenv, python, makeWrapper, recursivePthLoader, extraLibs ? [] }:
stdenv.mkDerivation {
name = "python-${python.version}-wrapper";
propagatedBuildInputs = extraLibs ++ [ python makeWrapper recursivePthLoader ];
unpackPhase = "true";
installPhase = ''
mkdir -p "$out/bin"
for prg in 2to3 idle pdb pdb${python.majorVersion} 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
ensureDir "$out/share"
2013-03-25 14:12:31 +00:00
ln -s "$python/share/man" "$out/share/man"
'';
inherit python;
inherit (python) meta;
}