2012-02-26 17:23:22 +00:00
|
|
|
# Create a python that knows about additional python packages via
|
|
|
|
# PYTHONPATH
|
|
|
|
|
2010-08-16 17:03:35 +00:00
|
|
|
{stdenv, python, makeWrapper, extraLibs ? []}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "python-${python.version}-wrapper";
|
|
|
|
|
2012-02-28 00:07:33 +00:00
|
|
|
propagatedBuildInputs = [python makeWrapper] ++ extraLibs;
|
2010-08-16 17:03:35 +00:00
|
|
|
|
|
|
|
unpackPhase = "true";
|
|
|
|
installPhase = ''
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p "$out/bin"
|
2010-08-16 17:03:35 +00:00
|
|
|
for prg in 2to3 idle 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"
|
|
|
|
ln "$python/share/man" "$out/share/man" -s
|
2010-08-16 17:03:35 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
inherit python;
|
|
|
|
inherit (python) meta;
|
|
|
|
}
|