2012-02-26 18:23:22 +01:00
|
|
|
# Create a python that knows about additional python packages via
|
|
|
|
# PYTHONPATH
|
|
|
|
|
2013-01-11 09:53:28 +01:00
|
|
|
{ stdenv, python, makeWrapper, recursivePthLoader, extraLibs ? [] }:
|
2010-08-16 19:03:35 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "python-${python.version}-wrapper";
|
|
|
|
|
2013-01-11 09:53:28 +01:00
|
|
|
propagatedBuildInputs = extraLibs ++ [ python makeWrapper recursivePthLoader ];
|
2010-08-16 19:03:35 +02:00
|
|
|
|
|
|
|
unpackPhase = "true";
|
|
|
|
installPhase = ''
|
2012-01-18 21:16:00 +01:00
|
|
|
mkdir -p "$out/bin"
|
2012-07-20 20:11:04 +02: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 12:17:32 +02:00
|
|
|
makeWrapper "$python/bin/$prg" "$out/bin/$prg" --suffix PYTHONPATH : "$PYTHONPATH"
|
2010-08-16 19:03:35 +02:00
|
|
|
done
|
2012-02-26 18:23:25 +01:00
|
|
|
ensureDir "$out/share"
|
2013-03-25 15:12:31 +01:00
|
|
|
ln -s "$python/share/man" "$out/share/man"
|
2010-08-16 19:03:35 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
inherit python;
|
|
|
|
inherit (python) meta;
|
|
|
|
}
|