2012-02-26 17:23:22 +00:00
|
|
|
# Create a python that knows about additional python packages via
|
|
|
|
# PYTHONPATH
|
|
|
|
|
2013-01-11 08:53:28 +00:00
|
|
|
{ stdenv, python, makeWrapper, recursivePthLoader, extraLibs ? [] }:
|
2010-08-16 18:03:35 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "python-${python.version}-wrapper";
|
|
|
|
|
2013-01-11 08:53:28 +00:00
|
|
|
propagatedBuildInputs = extraLibs ++ [ python makeWrapper recursivePthLoader ];
|
2010-08-16 18:03:35 +01:00
|
|
|
|
|
|
|
unpackPhase = "true";
|
|
|
|
installPhase = ''
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p "$out/bin"
|
2012-07-20 19:11:04 +01:00
|
|
|
for prg in 2to3 idle pdb pdb${python.majorVersion} pydoc python python-config python${python.majorVersion} python${python.majorVersion}-config smtpd.py; do
|
2010-08-17 11:17:32 +01:00
|
|
|
makeWrapper "$python/bin/$prg" "$out/bin/$prg" --suffix PYTHONPATH : "$PYTHONPATH"
|
2010-08-16 18:03:35 +01:00
|
|
|
done
|
2012-02-26 17:23:25 +00:00
|
|
|
ensureDir "$out/share"
|
|
|
|
ln "$python/share/man" "$out/share/man" -s
|
2010-08-16 18:03:35 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
inherit python;
|
|
|
|
inherit (python) meta;
|
|
|
|
}
|