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";
|
|
|
|
|
|
|
|
propagatedBuildInputs = [python makeWrapper] ++ extraLibs;
|
|
|
|
|
|
|
|
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
|
|
|
|
'';
|
|
|
|
|
|
|
|
inherit python;
|
|
|
|
inherit (python) meta;
|
|
|
|
}
|