Added "python-$version-wrapper" expression.
The python wrapper expression expects a list of Python modules, $extraLibs, which are added to $PYTHONPATH before executing the actual Python interpreter. svn path=/nixpkgs/trunk/; revision=23194
This commit is contained in:
19
pkgs/development/interpreters/python/wrapper.nix
Normal file
19
pkgs/development/interpreters/python/wrapper.nix
Normal file
@@ -0,0 +1,19 @@
|
||||
{stdenv, python, makeWrapper, extraLibs ? []}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "python-${python.version}-wrapper";
|
||||
|
||||
propagatedBuildInputs = [python makeWrapper] ++ extraLibs;
|
||||
|
||||
unpackPhase = "true";
|
||||
installPhase = ''
|
||||
ensureDir "$out/bin"
|
||||
declare -p
|
||||
for prg in 2to3 idle pydoc python python-config python${python.majorVersion} python${python.majorVersion}-config smtpd.py; do
|
||||
makeWrapper "$python/bin/$prg" "$out/bin/$prg" --set PYTHONPATH "$PYTHONPATH"
|
||||
done
|
||||
'';
|
||||
|
||||
inherit python;
|
||||
inherit (python) meta;
|
||||
}
|
||||
Reference in New Issue
Block a user