From f3ae22fa5fed09ee65f095e123f70c9a6400c2ea Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Fri, 19 Sep 2008 10:07:36 +0000 Subject: [PATCH] Install wrappers for Twisted binaries to ensure a correct ${PYTHONPATH}. svn path=/nixpkgs/trunk/; revision=12891 --- .../python-modules/twisted/default.nix | 15 ++++++++------- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/twisted/default.nix b/pkgs/development/python-modules/twisted/default.nix index ef2b2159169f..d80054e05535 100644 --- a/pkgs/development/python-modules/twisted/default.nix +++ b/pkgs/development/python-modules/twisted/default.nix @@ -1,16 +1,17 @@ -{stdenv, fetchurl, python, ZopeInterface}: +{stdenv, fetchurl, python, ZopeInterface, makeWrapper}: stdenv.mkDerivation { name = "twisted-8.1.0"; - src = fetchurl { url = http://tmrc.mit.edu/mirror/twisted/Twisted/8.1/Twisted-8.1.0.tar.bz2; sha256 = "0q25zbr4xzknaghha72mq57kh53qw1bf8csgp63pm9sfi72qhirl"; }; - buildInputs = [python]; - - propagatedBuildInputs = [ZopeInterface]; - - installPhase = "PYTHONPATH=$(toPythonPath $out):$PYTHONPATH; python ./setup.py install --prefix=$out"; + propagatedBuildInputs = [ZopeInterface makeWrapper]; + buildPhase = "true"; + installCommand = + '' + python ./setup.py install --prefix=$out --install-lib=$(toPythonPath $out) -O1 + for n in $out/bin/*; do wrapProgram $n --set PYTHONPATH "$(toPythonPath $out):$PYTHONPATH:\$PYTHONPATH"; done + ''; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e1e1f05e2479..34718f2cb245 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4602,7 +4602,7 @@ let }; twisted = import ../development/python-modules/twisted { - inherit fetchurl stdenv python ZopeInterface; + inherit fetchurl stdenv python ZopeInterface makeWrapper; }; ZopeInterface = import ../development/python-modules/ZopeInterface {