Author: chaoflow Date: Fri Sep 23 17:00:13 2011 New Revision: 29462 URL: https://ssl.nixos.org/websvn/nix/?rev=29462&sc=1
Log: python wrapper that sets PYTHONHOME to the profile it is in Added: nixpkgs/trunk/pkgs/development/interpreters/python/pythonhome-wrapper.nix Modified: nixpkgs/trunk/pkgs/top-level/all-packages.nix Added: nixpkgs/trunk/pkgs/development/interpreters/python/pythonhome-wrapper.nix ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ nixpkgs/trunk/pkgs/development/interpreters/python/pythonhome-wrapper.nix Fri Sep 23 17:00:13 2011 (r29462) @@ -0,0 +1,21 @@ +{ stdenv }: + +stdenv.mkDerivation { + name = "pythonhome-wrapper"; + + unpackPhase = "true"; + installPhase = '' + ensureDir $out/bin + echo ' +#!/bin/sh + +BINDIR=`dirname $0` +PYTHONHOME=`dirname $BINDIR` +PYTHONHOME=`(cd $PYTHONHOME && pwd)` +export PYTHONHOME + +$BINDIR/python "$@" + ' > $out/bin/py + chmod +x $out/bin/py + ''; +} Modified: nixpkgs/trunk/pkgs/top-level/all-packages.nix ============================================================================== --- nixpkgs/trunk/pkgs/top-level/all-packages.nix Fri Sep 23 16:58:45 2011 (r29461) +++ nixpkgs/trunk/pkgs/top-level/all-packages.nix Fri Sep 23 17:00:13 2011 (r29462) @@ -2585,6 +2585,8 @@ extraLibs = lib.attrValues python.modules; }; + pythonhomeWrapper = callPackage ../development/interpreters/python/pythonhome-wrapper.nix { }; + pyrex = pyrex095; pyrex095 = callPackage ../development/interpreters/pyrex/0.9.5.nix { }; _______________________________________________ nix-commits mailing list nix-comm...@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-commits