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