Author: eelco
Date: Tue Mar 29 15:19:59 2011
New Revision: 26594
URL: https://svn.nixos.org/websvn/nix/?rev=26594&sc=1

Log:
* wrapPythonPrograms: don't hard-code the Python library prefix.

Modified:
   
nixpkgs/branches/modular-python/pkgs/applications/version-management/bazaar/default.nix
   
nixpkgs/branches/modular-python/pkgs/applications/virtualization/xen/default.nix
   nixpkgs/branches/modular-python/pkgs/build-support/trivial-builders.nix
   
nixpkgs/branches/modular-python/pkgs/development/python-modules/generic/wrap.sh
   nixpkgs/branches/modular-python/pkgs/servers/gpsd/default.nix
   nixpkgs/branches/modular-python/pkgs/top-level/all-packages.nix
   nixpkgs/branches/modular-python/pkgs/top-level/python-packages.nix

Modified: 
nixpkgs/branches/modular-python/pkgs/applications/version-management/bazaar/default.nix
==============================================================================
--- 
nixpkgs/branches/modular-python/pkgs/applications/version-management/bazaar/default.nix
     Tue Mar 29 15:02:15 2011        (r26593)
+++ 
nixpkgs/branches/modular-python/pkgs/applications/version-management/bazaar/default.nix
     Tue Mar 29 15:19:59 2011        (r26594)
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, python, pythonPackages, wrapPython }:
+{ stdenv, fetchurl, pythonPackages }:
 
 stdenv.mkDerivation rec {
   version = "2.3";
@@ -10,7 +10,7 @@
     sha256 = "07kx41w4gqv68bcykdflsg68wvpmcyqknzyb4vr1zqlf27hahp53";
   };
 
-  buildInputs = [ python wrapPython ];
+  buildInputs = [ pythonPackages.python pythonPackages.wrapPython ];
 
   # Readline support is needed by bzrtools.
   pythonPath = [ pythonPackages.ssl pythonPackages.readline ];

Modified: 
nixpkgs/branches/modular-python/pkgs/applications/virtualization/xen/default.nix
==============================================================================
--- 
nixpkgs/branches/modular-python/pkgs/applications/virtualization/xen/default.nix
    Tue Mar 29 15:02:15 2011        (r26593)
+++ 
nixpkgs/branches/modular-python/pkgs/applications/virtualization/xen/default.nix
    Tue Mar 29 15:19:59 2011        (r26594)
@@ -1,6 +1,6 @@
-{ stdenv, fetchurl, which, zlib, pkgconfig, SDL, openssl, python
+{ stdenv, fetchurl, which, zlib, pkgconfig, SDL, openssl
 , libuuid, gettext, ncurses, dev86, iasl, pciutils, bzip2, xz
-, lvm2, utillinux, procps, texinfo, perl, wrapPython, pythonPackages }:
+, lvm2, utillinux, procps, texinfo, perl, pythonPackages }:
 
 with stdenv.lib;
 
@@ -50,8 +50,9 @@
     ];
 
   buildInputs =
-    [ which zlib pkgconfig SDL openssl python libuuid gettext ncurses
-      dev86 iasl pciutils bzip2 xz texinfo perl wrapPython
+    [ which zlib pkgconfig SDL openssl libuuid gettext ncurses
+      dev86 iasl pciutils bzip2 xz texinfo perl
+      pythonPackages.python pythonPackages.wrapPython
     ];
 
   pythonPath = [ pythonPackages.curses ];

Modified: 
nixpkgs/branches/modular-python/pkgs/build-support/trivial-builders.nix
==============================================================================
--- nixpkgs/branches/modular-python/pkgs/build-support/trivial-builders.nix     
Tue Mar 29 15:02:15 2011        (r26593)
+++ nixpkgs/branches/modular-python/pkgs/build-support/trivial-builders.nix     
Tue Mar 29 15:19:59 2011        (r26594)
@@ -45,13 +45,15 @@
 
 
   # Make a package that just contains a setup hook with the given contents.
-  makeSetupHook = deps: script:
-    runCommand "hook" { }
+  makeSetupHook = { deps ? [], substitutions ? {} }: script:
+    runCommand "hook" substitutions
       (''
         ensureDir $out/nix-support
         cp ${script} $out/nix-support/setup-hook
       '' + stdenv.lib.optionalString (deps != []) ''
         echo ${toString deps} > $out/nix-support/propagated-build-native-inputs
+      '' + stdenv.lib.optionalString (substitutions != {}) ''
+        substituteAll ${script} $out/nix-support/setup-hook
       '');
 
 

Modified: 
nixpkgs/branches/modular-python/pkgs/development/python-modules/generic/wrap.sh
==============================================================================
--- 
nixpkgs/branches/modular-python/pkgs/development/python-modules/generic/wrap.sh 
    Tue Mar 29 15:02:15 2011        (r26593)
+++ 
nixpkgs/branches/modular-python/pkgs/development/python-modules/generic/wrap.sh 
    Tue Mar 29 15:19:59 2011        (r26594)
@@ -35,7 +35,7 @@
     local dir="$1"
     if [ -n "${pythonPathsSeen[$dir]}" ]; then return; fi
     pythonPathsSeen[$dir]=1
-    addToSearchPath program_PYTHONPATH $dir/lib/python2.7/site-packages
+    addToSearchPath program_PYTHONPATH $dir/lib/@libPrefix@/site-packages
     addToSearchPath program_PATH $dir/bin
     local prop="$dir/nix-support/propagated-build-native-inputs"
     if [ -e $prop ]; then

Modified: nixpkgs/branches/modular-python/pkgs/servers/gpsd/default.nix
==============================================================================
--- nixpkgs/branches/modular-python/pkgs/servers/gpsd/default.nix       Tue Mar 
29 15:02:15 2011        (r26593)
+++ nixpkgs/branches/modular-python/pkgs/servers/gpsd/default.nix       Tue Mar 
29 15:19:59 2011        (r26594)
@@ -1,6 +1,6 @@
-{ fetchurl, stdenv, python, pkgconfig, dbus, dbus_glib
-, ncurses, libX11, libXt, libXpm, libXaw, libXext, wrapPython
-, libxslt, xmlto, gpsdUser ? "gpsd", pythonPackages }:
+{ fetchurl, stdenv, pythonPackages, pkgconfig, dbus, dbus_glib
+, ncurses, libX11, libXt, libXpm, libXaw, libXext
+, libxslt, xmlto, gpsdUser ? "gpsd" }:
 
 stdenv.mkDerivation rec {
   name = "gpsd-2.39";
@@ -11,9 +11,9 @@
   };
 
   buildInputs = [
-    python pkgconfig dbus dbus_glib ncurses
-    libX11 libXt libXpm libXaw libXext
-    wrapPython libxslt xmlto
+    pythonPackages.python pythonPackages.wrapPython
+    pkgconfig dbus dbus_glib ncurses libX11 libXt libXpm libXaw libXext
+    libxslt xmlto
   ];
 
   pythonPath = [ pythonPackages.curses ];

Modified: nixpkgs/branches/modular-python/pkgs/top-level/all-packages.nix
==============================================================================
--- nixpkgs/branches/modular-python/pkgs/top-level/all-packages.nix     Tue Mar 
29 15:02:15 2011        (r26593)
+++ nixpkgs/branches/modular-python/pkgs/top-level/all-packages.nix     Tue Mar 
29 15:19:59 2011        (r26594)
@@ -312,9 +312,7 @@
     inherit stdenv perl cpio contents ubootChooser;
   };
 
-  makeWrapper = makeSetupHook [] ../build-support/make-wrapper/make-wrapper.sh;
-
-  wrapPython = makeSetupHook [ makeWrapper ] 
../development/python-modules/generic/wrap.sh;
+  makeWrapper = makeSetupHook {} ../build-support/make-wrapper/make-wrapper.sh;
 
   makeModulesClosure = {kernel, rootModules, allowMissing ? false}:
     import ../build-support/kernel/modules-closure.nix {

Modified: nixpkgs/branches/modular-python/pkgs/top-level/python-packages.nix
==============================================================================
--- nixpkgs/branches/modular-python/pkgs/top-level/python-packages.nix  Tue Mar 
29 15:02:15 2011        (r26593)
+++ nixpkgs/branches/modular-python/pkgs/top-level/python-packages.nix  Tue Mar 
29 15:19:59 2011        (r26594)
@@ -10,17 +10,23 @@
 
 
   buildPythonPackage = import ../development/python-modules/generic {
-    inherit (pkgs) wrapPython lib;
-    inherit python setuptools;
+    inherit (pkgs) lib;
+    inherit python wrapPython setuptools;
   };
 
   
   setuptools = import ../development/python-modules/setuptools {
-    inherit (pkgs) stdenv fetchurl wrapPython;
-    inherit python;
+    inherit (pkgs) stdenv fetchurl;
+    inherit python wrapPython;
   };
 
 
+  wrapPython = pkgs.makeSetupHook
+    { deps = pkgs.makeWrapper;
+      substitutions.libPrefix = python.libPrefix;
+    }
+    ../development/python-modules/generic/wrap.sh;
+
 
   argparse = buildPythonPackage (rec {
     name = "argparse-1.1";
_______________________________________________
nix-commits mailing list
[email protected]
http://mail.cs.uu.nl/mailman/listinfo/nix-commits

Reply via email to