diff options
author | Peter Simons <simons@cryp.to> | 2010-08-16 17:03:35 +0000 |
---|---|---|
committer | Peter Simons <simons@cryp.to> | 2010-08-16 17:03:35 +0000 |
commit | 9670fca780f0b9f6123f199b3867f0bf2c55e275 (patch) | |
tree | 3ba1e403dd4d4f8c1bd402969e79287904741abc /pkgs/development/interpreters/python/wrapper.nix | |
parent | 42b5198e5b4b9b6bcb63906a8be6e399a403b22a (diff) | |
download | nixlib-9670fca780f0b9f6123f199b3867f0bf2c55e275.tar nixlib-9670fca780f0b9f6123f199b3867f0bf2c55e275.tar.gz nixlib-9670fca780f0b9f6123f199b3867f0bf2c55e275.tar.bz2 nixlib-9670fca780f0b9f6123f199b3867f0bf2c55e275.tar.lz nixlib-9670fca780f0b9f6123f199b3867f0bf2c55e275.tar.xz nixlib-9670fca780f0b9f6123f199b3867f0bf2c55e275.tar.zst nixlib-9670fca780f0b9f6123f199b3867f0bf2c55e275.zip |
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
Diffstat (limited to 'pkgs/development/interpreters/python/wrapper.nix')
-rw-r--r-- | pkgs/development/interpreters/python/wrapper.nix | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/pkgs/development/interpreters/python/wrapper.nix b/pkgs/development/interpreters/python/wrapper.nix new file mode 100644 index 000000000000..9002fc0ea1af --- /dev/null +++ b/pkgs/development/interpreters/python/wrapper.nix @@ -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; +} |