* wrapPythonPrograms: don't hard-code the Python library prefix.
svn path=/nixpkgs/branches/modular-python/; revision=26594
This commit is contained in:
parent
11b67ccee5
commit
353d450867
7 changed files with 29 additions and 22 deletions
|
@ -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 ];
|
||||
|
|
|
@ -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 ];
|
||||
|
|
|
@ -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
|
||||
'');
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 ];
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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";
|
||||
|
|
Loading…
Add table
Reference in a new issue