diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2011-03-29 15:19:59 +0000 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2011-03-29 15:19:59 +0000 |
commit | 353d4508672f05965835f7122b1551f08472776c (patch) | |
tree | c2bb7066f6ad0af30b9ec75c94e76cc232aaa9ff | |
parent | 11b67ccee5a2f3c1b12430c7e1f892ac6bccd1c1 (diff) | |
download | nixlib-353d4508672f05965835f7122b1551f08472776c.tar nixlib-353d4508672f05965835f7122b1551f08472776c.tar.gz nixlib-353d4508672f05965835f7122b1551f08472776c.tar.bz2 nixlib-353d4508672f05965835f7122b1551f08472776c.tar.lz nixlib-353d4508672f05965835f7122b1551f08472776c.tar.xz nixlib-353d4508672f05965835f7122b1551f08472776c.tar.zst nixlib-353d4508672f05965835f7122b1551f08472776c.zip |
* wrapPythonPrograms: don't hard-code the Python library prefix.
svn path=/nixpkgs/branches/modular-python/; revision=26594
-rw-r--r-- | pkgs/applications/version-management/bazaar/default.nix | 4 | ||||
-rw-r--r-- | pkgs/applications/virtualization/xen/default.nix | 9 | ||||
-rw-r--r-- | pkgs/build-support/trivial-builders.nix | 6 | ||||
-rw-r--r-- | pkgs/development/python-modules/generic/wrap.sh | 2 | ||||
-rw-r--r-- | pkgs/servers/gpsd/default.nix | 12 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 4 | ||||
-rw-r--r-- | pkgs/top-level/python-packages.nix | 14 |
7 files changed, 29 insertions, 22 deletions
diff --git a/pkgs/applications/version-management/bazaar/default.nix b/pkgs/applications/version-management/bazaar/default.nix index 1bfaf0cbd5d2..8eb28ea04c73 100644 --- a/pkgs/applications/version-management/bazaar/default.nix +++ b/pkgs/applications/version-management/bazaar/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, python, pythonPackages, wrapPython }: +{ stdenv, fetchurl, pythonPackages }: stdenv.mkDerivation rec { version = "2.3"; @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { sha256 = "07kx41w4gqv68bcykdflsg68wvpmcyqknzyb4vr1zqlf27hahp53"; }; - buildInputs = [ python wrapPython ]; + buildInputs = [ pythonPackages.python pythonPackages.wrapPython ]; # Readline support is needed by bzrtools. pythonPath = [ pythonPackages.ssl pythonPackages.readline ]; diff --git a/pkgs/applications/virtualization/xen/default.nix b/pkgs/applications/virtualization/xen/default.nix index b688bf1e3107..587f0c99f3ac 100644 --- a/pkgs/applications/virtualization/xen/default.nix +++ b/pkgs/applications/virtualization/xen/default.nix @@ -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 @@ stdenv.mkDerivation { ]; 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 ]; diff --git a/pkgs/build-support/trivial-builders.nix b/pkgs/build-support/trivial-builders.nix index 1998d91d1260..5defdb55b959 100644 --- a/pkgs/build-support/trivial-builders.nix +++ b/pkgs/build-support/trivial-builders.nix @@ -45,13 +45,15 @@ rec { # 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 ''); diff --git a/pkgs/development/python-modules/generic/wrap.sh b/pkgs/development/python-modules/generic/wrap.sh index fb20c5fd7233..65f3229ca7c4 100644 --- a/pkgs/development/python-modules/generic/wrap.sh +++ b/pkgs/development/python-modules/generic/wrap.sh @@ -35,7 +35,7 @@ _addToPythonPath() { 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 diff --git a/pkgs/servers/gpsd/default.nix b/pkgs/servers/gpsd/default.nix index c531eafa05a6..267665f7a8b3 100644 --- a/pkgs/servers/gpsd/default.nix +++ b/pkgs/servers/gpsd/default.nix @@ -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 @@ stdenv.mkDerivation rec { }; 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 ]; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b0d77d6e066d..de555d4582dd 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -312,9 +312,7 @@ let 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 { diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index dcbe03e615c4..123c427c5f71 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -10,17 +10,23 @@ python.modules // rec { 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"; |