git.iko.soy/typeable/nixpkgs
on master help sign in
Merge remote-tracking branch 'upstream/python-unstable' into HEAD
commit35f5912db57a5102377d9687c69c6c7b0753979e authorFrederik Rietdijk <fridh@fridh.nl> dateThu 23 Nov 2017, 16:38 (9 years ago) parent6ad796759d82d8
14 files changed+135−101
pkgs/development/interpreters/python/build-python-package.nix+11−5 pkgs/development/interpreters/python/cpython/2.7/default.nix+1−1 pkgs/development/interpreters/python/cpython/3.4/default.nix+1−1 pkgs/development/interpreters/python/cpython/3.5/default.nix+1−1 pkgs/development/interpreters/python/cpython/3.6/default.nix+1−1 pkgs/development/interpreters/python/mk-python-derivation.nix+17−17 pkgs/development/interpreters/python/pypy/2.7/default.nix+1−1 pkgs/development/interpreters/python/wrapper.nix+4−3 pkgs/development/libraries/physics/rivet/default.nix−2 pkgs/development/python-modules/bootstrapped-pip/default.nix+2−2 pkgs/development/python-modules/pytest/default.nix+4−4 pkgs/development/python-modules/setuptools/default.nix+2−2 pkgs/tools/misc/system-config-printer/default.nix+1−2 pkgs/top-level/python-packages.nix+89−59
pkgs/development/interpreters/python/build-python-package.nix+11−5
@@ -1,11 +1,14 @@
1−/* This function provides a generic Python package builder. It is
2− intended to work with packages that use `distutils/setuptools'
3− (http://pypi.python.org/pypi/setuptools/), which represents a large
4− number of Python packages nowadays. */
1+# This function provides a generic Python package builder,
2+# and can build packages that use distutils, setuptools or flit.
53
64{ lib
75, python
8−, mkPythonDerivation
6+, wrapPython
7+, setuptools
8+, unzip
9+, ensureNewerSourcesHook
10+, pythonModule
11+, namePrefix
912, bootstrapped-pip
1013, flit
1114}:
@@ -15,6 +18,9 @@ let
1518 flit-specific = import ./build-python-package-flit.nix { inherit python flit; };
1619 wheel-specific = import ./build-python-package-wheel.nix { };
1720 common = import ./build-python-package-common.nix { inherit python bootstrapped-pip; };
21+ mkPythonDerivation = import ./mk-python-derivation.nix {
22+ inherit lib python wrapPython setuptools unzip ensureNewerSourcesHook pythonModule namePrefix;
23+ };
1824in
1925
2026{
pkgs/development/interpreters/python/cpython/2.7/default.nix+1−1
@@ -201,7 +201,7 @@ in stdenv.mkDerivation {
201201 in rec {
202202 inherit libPrefix sitePackages x11Support hasDistutilsCxxPatch;
203203 executable = libPrefix;
204− buildEnv = callPackage ../../wrapper.nix { python = self; };
204+ buildEnv = callPackage ../../wrapper.nix { python = self; inherit (pythonPackages) requiredPythonModules; };
205205 withPackages = import ../../with-packages.nix { inherit buildEnv pythonPackages;};
206206 pkgs = pythonPackages;
207207 isPy2 = true;
pkgs/development/interpreters/python/cpython/3.4/default.nix+1−1
@@ -160,7 +160,7 @@ in stdenv.mkDerivation {
160160 in rec {
161161 inherit libPrefix sitePackages x11Support;
162162 executable = "${libPrefix}m";
163− buildEnv = callPackage ../../wrapper.nix { python = self; };
163+ buildEnv = callPackage ../../wrapper.nix { python = self; inherit (pythonPackages) requiredPythonModules; };
164164 withPackages = import ../../with-packages.nix { inherit buildEnv pythonPackages;};
165165 pkgs = pythonPackages;
166166 isPy3 = true;
pkgs/development/interpreters/python/cpython/3.5/default.nix+1−1
@@ -154,7 +154,7 @@ in stdenv.mkDerivation {
154154 in rec {
155155 inherit libPrefix sitePackages x11Support;
156156 executable = "${libPrefix}m";
157− buildEnv = callPackage ../../wrapper.nix { python = self; };
157+ buildEnv = callPackage ../../wrapper.nix { python = self; inherit (pythonPackages) requiredPythonModules; };
158158 withPackages = import ../../with-packages.nix { inherit buildEnv pythonPackages;};
159159 pkgs = pythonPackages;
160160 isPy3 = true;
pkgs/development/interpreters/python/cpython/3.6/default.nix+1−1
@@ -153,7 +153,7 @@ in stdenv.mkDerivation {
153153 in rec {
154154 inherit libPrefix sitePackages x11Support;
155155 executable = "${libPrefix}m";
156− buildEnv = callPackage ../../wrapper.nix { python = self; };
156+ buildEnv = callPackage ../../wrapper.nix { python = self; inherit (pythonPackages) requiredPythonModules; };
157157 withPackages = import ../../with-packages.nix { inherit buildEnv pythonPackages;};
158158 pkgs = pythonPackages;
159159 isPy3 = true;
pkgs/development/interpreters/python/mk-python-derivation.nix+17−17
@@ -1,4 +1,4 @@
1−/* Generic builder for Python packages that come without a setup.py. */
1+# Generic builder.
22
33{ lib
44, python
@@ -6,13 +6,13 @@
66, setuptools
77, unzip
88, ensureNewerSourcesHook
9+# Whether the derivation provides a Python module or not.
10+, pythonModule
11+, namePrefix
912}:
1013
1114{ name ? "${attrs.pname}-${attrs.version}"
1215
13−# by default prefix `name` e.g. "python3.3-${name}"
14−, namePrefix ? python.libPrefix + "-"
15−
1616# Dependencies for building the package
1717, buildInputs ? []
1818
@@ -54,18 +54,21 @@ if disabled
5454then throw "${name} not supported for interpreter ${python.executable}"
5555else
5656
57−python.stdenv.mkDerivation (builtins.removeAttrs attrs ["disabled" "checkInputs"] // {
57+python.stdenv.mkDerivation (builtins.removeAttrs attrs [
58+ "disabled" "checkInputs" "doCheck" "doInstallCheck" "dontWrapPythonPrograms" "catchConflicts"
59+ ] // {
5860
5961 name = namePrefix + name;
6062
61− inherit pythonPath;
62−
63− buildInputs = [ wrapPython ] ++ buildInputs ++ pythonPath
64− ++ [ (ensureNewerSourcesHook { year = "1980"; }) ]
63+ buildInputs = ([ wrapPython (ensureNewerSourcesHook { year = "1980"; }) ]
6564 ++ (lib.optional (lib.hasSuffix "zip" attrs.src.name or "") unzip)
66− ++ lib.optionals doCheck checkInputs;
65+ ++ lib.optionals doCheck checkInputs
66+ ++ lib.optional catchConflicts setuptools # If we nog longer propagate setuptools
67+ ++ buildInputs
68+ ++ pythonPath
69+ );
6770
68− # propagate python/setuptools to active setup-hook in nix-shell
71+ # Propagate python and setuptools. We should stop propagating setuptools.
6972 propagatedBuildInputs = propagatedBuildInputs ++ [ python setuptools ];
7073
7174 # Python packages don't have a checkPhase, only an installCheckPhase
@@ -83,15 +86,12 @@ python.stdenv.mkDerivation (builtins.removeAttrs attrs ["disabled" "checkInputs"
8386
8487 passthru = {
8588 inherit python; # The python interpreter
89+ inherit pythonModule;
8690 } // passthru;
8791
88− meta = with lib.maintainers; {
92+ meta = {
8993 # default to python's platforms
9094 platforms = python.meta.platforms;
91− } // meta // {
92− # add extra maintainer(s) to every package
93− maintainers = (meta.maintainers or []) ++ [ chaoflow ];
94− # a marker for release utilities to discover python packages
9595 isBuildPythonPackage = python.meta.platforms;
96− };
96+ } // meta;
9797})
pkgs/development/interpreters/python/pypy/2.7/default.nix+1−1
@@ -137,7 +137,7 @@ in stdenv.mkDerivation rec {
137137 inherit zlibSupport libPrefix sitePackages;
138138 executable = "pypy";
139139 isPypy = true;
140− buildEnv = callPackage ../../wrapper.nix { python = self; };
140+ buildEnv = callPackage ../../wrapper.nix { python = self; inherit (pythonPackages) requiredPythonModules; };
141141 interpreter = "${self}/bin/${executable}";
142142 withPackages = import ../../with-packages.nix { inherit buildEnv pythonPackages;};
143143 pkgs = pythonPackages;
pkgs/development/interpreters/python/wrapper.nix+4−3
@@ -2,13 +2,14 @@
22, extraLibs ? []
33, extraOutputsToInstall ? []
44, postBuild ? ""
5−, ignoreCollisions ? false }:
5+, ignoreCollisions ? false
6+, requiredPythonModules
7+, }:
68
79# Create a python executable that knows about additional packages.
810let
9− recursivePthLoader = import ../../python-modules/recursive-pth-loader/default.nix { stdenv = stdenv; python = python; };
1011 env = let
11− paths = stdenv.lib.closePropagation (extraLibs ++ [ python recursivePthLoader ] ) ;
12+ paths = requiredPythonModules (extraLibs ++ [ python ] ) ;
1213 in buildEnv {
1314 name = "${python.name}-env";
1415
pkgs/development/libraries/physics/rivet/default.nix−2
@@ -11,8 +11,6 @@ stdenv.mkDerivation rec {
1111
1212 postPatch = "patchShebangs ./src/Analyses/cat_with_lines";
1313
14− pythonPath = []; # python wrapper support
15−
1614 patches = [
1715 ./darwin.patch # configure relies on impure sw_vers to -Dunix
1816 ];
pkgs/development/python-modules/bootstrapped-pip/default.nix+2−2
@@ -9,9 +9,9 @@ let
99 };
1010 setuptools_source = fetchPypi {
1111 pname = "setuptools";
12− version = "36.4.0";
12+ version = "36.7.1";
1313 format = "wheel";
14− sha256 = "4d54c0bfee283e78609169213f9c075827d5837086f58b588b417b093c23464b";
14+ sha256 = "eaacfa35eb11199d0b017df416421781a75209817bff3f94820556e36c49bd77";
1515 };
1616
1717 # TODO: Shouldn't be necessary anymore for pip > 9.0.1!
pkgs/development/python-modules/pytest/default.nix+4−4
@@ -1,10 +1,9 @@
11{ stdenv, buildPythonPackage, fetchPypi, isPy26, argparse, hypothesis, py
2−, setuptools_scm
2+, setuptools_scm, setuptools
33}:
44buildPythonPackage rec {
55 version = "3.2.5";
66 pname = "pytest";
7− name = "${pname}-${version}";
87
98 preCheck = ''
109 # don't test bash builtins
@@ -16,8 +15,9 @@ buildPythonPackage rec {
1615 sha256 = "6d5bd4f7113b444c55a3bbb5c738a3dd80d43563d063fc42dcb0aaefbdd78b81";
1716 };
1817
19− buildInputs = [ hypothesis setuptools_scm ];
20− propagatedBuildInputs = [ py ]
18+ checkInputs = [ hypothesis ];
19+ buildInputs = [ setuptools_scm ];
20+ propagatedBuildInputs = [ py setuptools ]
2121 ++ (stdenv.lib.optional isPy26 argparse);
2222
2323 meta = with stdenv.lib; {
pkgs/development/python-modules/setuptools/default.nix+2−2
@@ -8,13 +8,13 @@
88# Should use buildPythonPackage here somehow
99stdenv.mkDerivation rec {
1010 pname = "setuptools";
11− version = "36.6.0";
11+ version = "36.7.1";
1212 name = "${python.libPrefix}-${pname}-${version}";
1313
1414 src = fetchPypi {
1515 inherit pname version;
1616 extension = "zip";
17− sha256 = "62074589522a798da243f47348f38020d55b6c945652e2f2c09d3a96299812b7";
17+ sha256 = "543becf5d33d8989dc5222403997488e9dc3872bdecdabb0f57184ca253ec1e8";
1818 };
1919
2020 buildInputs = [ python wrapPython unzip ];
pkgs/tools/misc/system-config-printer/default.nix+1−2
@@ -28,8 +28,7 @@ stdenv.mkDerivation rec {
2828
2929 nativeBuildInputs = [ wrapGAppsHook ];
3030
31− pythonPath = with pythonPackages;
32− [ pycups pycurl dbus-python pygobject3 requests pycairo pysmbc ];
31+ pythonPath = with pythonPackages; requiredPythonModules [ pycups pycurl dbus-python pygobject3 requests pycairo pysmbc ];
3332
3433 configureFlags =
3534 [ "--with-udev-rules"
pkgs/top-level/python-packages.nix+89−59
@@ -31,10 +31,9 @@ let
3131
3232 callPackage = pkgs.newScope self;
3333
34− bootstrapped-pip = callPackage ../development/python-modules/bootstrapped-pip { };
34+ namePrefix = python.libPrefix + "-";
3535
36− mkPythonDerivation = makeOverridable( callPackage ../development/interpreters/python/mk-python-derivation.nix {
37− });
36+ bootstrapped-pip = callPackage ../development/python-modules/bootstrapped-pip { };
3837
3938 # Derivations built with `buildPythonPackage` can already be overriden with `override`, `overrideAttrs`, and `overrideDerivation`.
4039 # This function introduces `overridePythonAttrs` and it overrides the call to `buildPythonPackage`.
@@ -52,13 +51,20 @@ let
5251 }
5352 else ff;
5453
55− buildPythonPackage = makeOverridablePythonPackage (callPackage ../development/interpreters/python/build-python-package.nix {
56− inherit mkPythonDerivation;
54+ buildPythonPackage = makeOverridablePythonPackage ( makeOverridable (callPackage ../development/interpreters/python/build-python-package.nix {
5755 inherit bootstrapped-pip;
5856 flit = self.flit;
59− });
57+ # We want Python libraries to be named like e.g. "python3.6-${name}"
58+ inherit namePrefix;
59+ pythonModule = python;
60+ }));
6061
61− buildPythonApplication = args: buildPythonPackage ({namePrefix="";} // args );
62+ buildPythonApplication = makeOverridablePythonPackage ( makeOverridable (callPackage ../development/interpreters/python/build-python-package.nix {
63+ inherit bootstrapped-pip;
64+ flit = self.flit;
65+ namePrefix = "";
66+ pythonModule = false;
67+ }));
6268
6369 graphiteVersion = "1.0.2";
6470
@@ -80,10 +86,40 @@ let
8086 else throw "Unsupported kind ${kind}");
8187 in fetcher (builtins.removeAttrs attrs ["format"]) );
8288
89+ # Check whether a derivation provides a Python module.
90+ hasPythonModule = drv: (hasAttr "pythonModule" drv) && ( (getAttr "pythonModule" drv) == python);
91+
92+ # Get list of required Python modules given a list of derivations.
93+ requiredPythonModules = drvs: let
94+ filterNull = list: filter (x: !isNull x) list;
95+ conditionalGetRecurse = attr: condition: drv: let f = conditionalGetRecurse attr condition; in
96+ (if (condition drv) then unique [drv]++(concatMap f (filterNull(getAttr attr drv))) else []);
97+ _required = drv: conditionalGetRecurse "propagatedBuildInputs" hasPythonModule drv;
98+ in [python] ++ (unique (concatMap _required (filterNull drvs)));
99+
100+ # Create a PYTHONPATH from a list of derivations. This function recurses into the items to find derivations
101+ # providing Python modules.
102+ makePythonPath = drvs: stdenv.lib.makeSearchPath python.sitePackages (requiredPythonModules drvs);
103+
104+ # Convert derivation to a Python module.
105+ toPythonModule = drv:
106+ drv.overrideAttrs( oldAttrs: {
107+ # Use passthru in order to prevent rebuilds when possible.
108+ passthru = (oldAttrs.passthru or {})// {
109+ name = namePrefix + oldAttrs.name;
110+ pythonModule = python;
111+ pythonPath = [ ]; # Deprecated, for compatibility.
112+ };
113+ });
114+
115+ disabledIf = x: drv:
116+ if x then throw "${removePrefix namePrefix (drv.pname or drv.name)} not supported for interpreter ${python.executable}" else drv;
117+
83118in {
84119
85− inherit python bootstrapped-pip pythonAtLeast pythonOlder isPy26 isPy27 isPy33 isPy34 isPy35 isPy36 isPyPy isPy3k mkPythonDerivation buildPythonPackage buildPythonApplication;
120+ inherit python bootstrapped-pip pythonAtLeast pythonOlder isPy26 isPy27 isPy33 isPy34 isPy35 isPy36 isPyPy isPy3k buildPythonPackage buildPythonApplication;
86121 inherit fetchPypi callPackage;
122+ inherit hasPythonModule requiredPythonModules makePythonPath disabledIf;
87123
88124 # helpers
89125
@@ -154,9 +190,7 @@ in {
154190
155191 breathe = callPackage ../development/python-modules/breathe { };
156192
157− browsermob-proxy = if ! isPy3k then
158− callPackage ../development/python-modules/browsermob-proxy {}
159− else throw "browsermob-proxy is not supported for ${python.executable}";
193+ browsermob-proxy = disabledIf isPy3k (callPackage ../development/python-modules/browsermob-proxy {});
160194
161195 bugseverywhere = callPackage ../applications/version-management/bugseverywhere {};
162196
@@ -222,11 +256,11 @@ in {
222256
223257 pyamf = callPackage ../development/python-modules/pyamf { };
224258
225− pyatspi = if isPy3k then callPackage ../development/python-modules/pyatspi { } else throw "pyatspi not supported for interpreter ${python.executable}";
259+ pyatspi = disabledIf (!isPy3k) (callPackage ../development/python-modules/pyatspi { });
226260
227261 pycairo = callPackage ../development/python-modules/pycairo { };
228262
229− pycangjie = if isPy3k then callPackage ../development/python-modules/pycangjie { } else throw "pycangjie not supported for interpreter ${python.executable}";
263+ pycangjie = disabledIf (!isPy3k) (callPackage ../development/python-modules/pycangjie { });
230264
231265 pycrypto = callPackage ../development/python-modules/pycrypto { };
232266
@@ -236,7 +270,7 @@ in {
236270
237271 PyChromecast = callPackage ../development/python-modules/pychromecast { };
238272
239− pyexiv2 = if (!isPy3k) then callPackage ../development/python-modules/pyexiv2 {} else throw "pyexiv2 not supported for interpreter ${python.executable}";
273+ pyexiv2 = disabledIf isPy3k (callPackage ../development/python-modules/pyexiv2 {});
240274
241275 py3exiv2 = callPackage ../development/python-modules/py3exiv2 { };
242276
@@ -298,13 +332,13 @@ in {
298332
299333 PyWebDAV = callPackage ../development/python-modules/pywebdav { };
300334
301− pyxml = if !isPy3k then callPackage ../development/python-modules/pyxml{ } else throw "pyxml not supported for interpreter ${python.executable}";
335+ pyxml = disabledIf isPy3k (callPackage ../development/python-modules/pyxml{ });
302336
303337 relatorio = callPackage ../development/python-modules/relatorio { };
304338
305339 pyzufall = callPackage ../development/python-modules/pyzufall { };
306340
307− rhpl = if !isPy3k then callPackage ../development/python-modules/rhpl {} else throw "rhpl not supported for interpreter ${python.executable}";
341+ rhpl = disabledIf isPy3k (callPackage ../development/python-modules/rhpl {});
308342
309343 simpleeval = callPackage ../development/python-modules/simpleeval { };
310344
@@ -1336,10 +1370,10 @@ in {
13361370
13371371 # Build boost for this specific Python version
13381372 # TODO: use separate output for libboost_python.so
1339− boost = pkgs.boost.override {
1373+ boost = toPythonModule (pkgs.boost.override {
13401374 inherit (self) python numpy;
13411375 enablePython = true;
1342− };
1376+ });
13431377
13441378 buttersink = buildPythonPackage rec {
13451379 name = "buttersink-0.6.8";
@@ -3200,15 +3234,15 @@ in {
32003234 propagatedBuildInputs = with self; [ pyusb ];
32013235 };
32023236
3203− opencv = pkgs.opencv.override {
3237+ opencv = toPythonModule (pkgs.opencv.override {
32043238 enablePython = true;
32053239 pythonPackages = self;
3206− };
3240+ });
32073241
3208− opencv3 = pkgs.opencv3.override {
3242+ opencv3 = toPythonModule (pkgs.opencv3.override {
32093243 enablePython = true;
32103244 pythonPackages = self;
3211− };
3245+ });
32123246
32133247 openidc-client = callPackage ../development/python-modules/openidc-client/default.nix {};
32143248
@@ -4735,13 +4769,11 @@ in {
47354769
47364770 easy-thumbnails = callPackage ../development/python-modules/easy-thumbnails { };
47374771
4738− eccodes = if (isPy27) then
4739− (pkgs.eccodes.overrideAttrs (oldattrs: {
4740− name = "${python.libPrefix}-" + oldattrs.name;
4741− })).override {
4742− enablePython = true;
4743− pythonPackages = self;
4744− } else throw "eccodes not supported for interpreter ${python.executable}";
4772+ eccodes = disabledIf (!isPy27)
4773+ (toPythonModule (pkgs.eccodes.override {
4774+ enablePython = true;
4775+ pythonPackages = self;
4776+ }));
47454777
47464778 EditorConfig = buildPythonPackage rec {
47474779 name = "EditorConfig-${version}";
@@ -8712,10 +8744,10 @@ in {
87128744
87138745 folium = callPackage ../development/python-modules/folium { };
87148746
8715− fontforge = pkgs.fontforge.override {
8747+ fontforge = toPythonModule (pkgs.fontforge.override {
87168748 withPython = true;
87178749 inherit python;
8718− };
8750+ });
87198751
87208752 fonttools = callPackage ../development/python-modules/fonttools { };
87218753
@@ -8889,11 +8921,9 @@ in {
88898921 };
88908922 };
88918923
8892− gdal = (pkgs.gdal.overrideDerivation (oldattrs: {
8893− name = "${python.libPrefix}-" + oldattrs.name;
8894− })).override {
8924+ gdal = toPythonModule (pkgs.gdal.override {
88958925 pythonPackages = self;
8896− };
8926+ });
88978927
88988928 gdrivefs = buildPythonPackage rec {
88998929 version = "0.14.8";
@@ -9265,13 +9295,11 @@ in {
92659295 };
92669296 };
92679297
9268− grib-api = if (isPy27) then
9269− (pkgs.grib-api.overrideAttrs (oldattrs: {
9270− name = "${python.libPrefix}-" + oldattrs.name;
9271− })).override {
9272− enablePython = true;
9273− pythonPackages = self;
9274− } else throw "grib-api not supported for interpreter ${python.executable}";
9298+ grib-api = disabledIf (!isPy27) (toPythonModule
9299+ (pkgs.grib-api.override {
9300+ enablePython = true;
9301+ pythonPackages = self;
9302+ }));
92759303
92769304 gspread = buildPythonPackage rec {
92779305 version = "0.2.3";
@@ -10373,14 +10401,14 @@ in {
1037310401 inherit (pkgs) libsodium;
1037410402 };
1037510403
10376− libplist = if isPy3k then throw "libplist not supported for interpreter ${python.executable}" else
10377− (pkgs.libplist.override{python2Packages=self; }).py;
10404+ libplist = disabledIf isPy3k
10405+ (toPythonModule (pkgs.libplist.override{python2Packages=self; })).py;
1037810406
10379− libxml2 = if isPy3k then throw "libxml2 not supported for interpreter ${python.executable}" else
10380− (pkgs.libxml2.override{pythonSupport=true; python2=python;}).py;
10407+ libxml2 = disabledIf isPy3k
10408+ (toPythonModule (pkgs.libxml2.override{pythonSupport=true; python2=python;})).py;
1038110409
10382− libxslt = if isPy3k then throw "libxslt not supported for interpreter ${python.executable}" else
10383− (pkgs.libxslt.override{pythonSupport=true; python2=python; inherit (self) libxml2;}).py;
10410+ libxslt = disabledIf isPy3k
10411+ (toPythonModule (pkgs.libxslt.override{pythonSupport=true; python2=python; inherit (self) libxml2;})).py;
1038410412
1038510413 limnoria = buildPythonPackage rec {
1038610414 name = "limnoria-${version}";
@@ -16994,9 +17022,8 @@ in {
1699417022 };
1699517023 };
1699617024
16997− qscintilla = if isPy3k || isPyPy
16998− then throw "qscintilla-${pkgs.qscintilla.version} not supported for interpreter ${python.executable}"
16999− else buildPythonPackage rec {
17025+ qscintilla = disabledIf (isPy3k || isPyPy)
17026+ (buildPythonPackage rec {
1700017027 # TODO: Qt5 support
1700117028 name = "qscintilla-${version}";
1700217029 version = pkgs.qscintilla.version;
@@ -17025,7 +17052,7 @@ in {
1702517052 maintainers = with maintainers; [ danbst ];
1702617053 platforms = platforms.linux;
1702717054 };
17028− };
17055+ });
1702917056
1703017057
1703117058 qserve = buildPythonPackage rec {
@@ -17173,6 +17200,10 @@ in {
1717317200
1717417201 readme_renderer = callPackage ../development/python-modules/readme_renderer { };
1717517202
17203+ rivet = disabledIf isPy3k (toPythonModule (pkgs.rivet.override {
17204+ python2 = python;
17205+ }));
17206+
1717617207 rjsmin = callPackage ../development/python-modules/rjsmin { };
1717717208
1717817209 pysolr = buildPythonPackage rec {
@@ -17444,7 +17475,7 @@ in {
1744417475
1744517476 rply = callPackage ../development/python-modules/rply/default.nix {};
1744617477
17447− rpm = (pkgs.rpm.override{inherit python;});
17478+ rpm = toPythonModule (pkgs.rpm.override{inherit python;});
1744817479
1744917480 rpmfluff = callPackage ../development/python-modules/rpmfluff {};
1745017481
@@ -22091,7 +22122,7 @@ EOF
2209122122 };
2209222123
2209322124 # For backwards compatibility. Please use nixpkgs.udiskie instead.
22094− udiskie = pkgs.udiskie.override { pythonPackages = self; };
22125+ udiskie = toPythonModule (pkgs.udiskie.override { pythonPackages = self; });
2209522126
2209622127 # Should be bumped along with EFL!
2209722128 pythonefl = buildPythonPackage rec {
@@ -24353,9 +24384,8 @@ EOF
2435324384 ROPGadget = callPackage ../development/python-modules/ROPGadget { };
2435424385
2435524386 # We need "normal" libxml2 and not the python package by the same name.
24356− pywbem = if !(isPy36)
24357− then callPackage ../development/python-modules/pywbem { libxml2 = pkgs.libxml2; }
24358− else throw "pywbem not supported for interpreter ${python.executable}";
24387+ pywbem = disabledIf isPy36
24388+ (callPackage ../development/python-modules/pywbem { libxml2 = pkgs.libxml2; });
2435924389
2436024390 unicorn = callPackage ../development/python-modules/unicorn { };
2436124391
@@ -24427,8 +24457,8 @@ EOF
2442724457
2442824458 zeep = callPackage ../development/python-modules/zeep { };
2442924459
24430− zeitgeist = if isPy3k then throw "zeitgeist not supported for interpreter ${python.executable}" else
24431− (pkgs.zeitgeist.override{python2Packages=self;}).py;
24460+ zeitgeist = disabledIf isPy3k
24461+ (toPythonModule (pkgs.zeitgeist.override{python2Packages=self;})).py;
2443224462
2443324463 zeroconf = callPackage ../development/python-modules/zeroconf { };
2443424464