summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--pkgs/applications/audio/a2jmidid/default.nix14
-rw-r--r--pkgs/applications/audio/gpodder/default.nix7
-rw-r--r--pkgs/applications/audio/mopidy/default.nix4
-rw-r--r--pkgs/applications/audio/quodlibet/default.nix14
-rw-r--r--pkgs/applications/audio/sonata/default.nix15
-rw-r--r--pkgs/applications/misc/batti/default.nix11
-rw-r--r--pkgs/applications/misc/cherrytree/default.nix6
-rw-r--r--pkgs/applications/misc/guake/default.nix12
-rw-r--r--pkgs/applications/misc/hamster-time-tracker/default.nix9
-rw-r--r--pkgs/applications/misc/printrun/default.nix2
-rw-r--r--pkgs/applications/networking/instant-messengers/gajim/default.nix4
-rw-r--r--pkgs/applications/networking/instant-messengers/salut-a-toi/default.nix17
-rw-r--r--pkgs/applications/networking/mailreaders/mailnag/default.nix6
-rw-r--r--pkgs/applications/networking/sync/backintime/common.nix8
-rw-r--r--pkgs/applications/version-management/rabbitvcs/default.nix2
-rw-r--r--pkgs/applications/video/devede/default.nix6
-rw-r--r--pkgs/applications/video/kazam/default.nix4
-rw-r--r--pkgs/applications/video/miro/default.nix2
-rw-r--r--pkgs/applications/video/pitivi/default.nix2
-rw-r--r--pkgs/applications/virtualization/virt-manager/default.nix6
-rw-r--r--pkgs/applications/window-managers/compiz/default.nix10
-rw-r--r--pkgs/desktops/enlightenment/econnman.nix2
-rw-r--r--pkgs/desktops/enlightenment/efl.nix2
-rw-r--r--pkgs/desktops/gnome-2/bindings/gnome-python/default.nix8
-rw-r--r--pkgs/desktops/gnome-3/3.20/apps/gnome-music/default.nix6
-rw-r--r--pkgs/development/libraries/telepathy/qt/default.nix10
-rw-r--r--pkgs/development/python-modules/pyqt/4.x.nix11
-rw-r--r--pkgs/development/python-modules/pyqt/5.x.nix6
-rw-r--r--pkgs/misc/emulators/cdemu/client.nix4
-rw-r--r--pkgs/misc/jackaudio/default.nix7
-rw-r--r--pkgs/misc/jackaudio/git.nix7
-rw-r--r--pkgs/os-specific/linux/bluez/bluez5.nix8
-rw-r--r--pkgs/os-specific/linux/bluez/bluez5_28.nix10
-rw-r--r--pkgs/os-specific/linux/bluez/default.nix13
-rw-r--r--pkgs/os-specific/linux/ffado/default.nix4
-rw-r--r--pkgs/os-specific/linux/pam_usb/default.nix5
-rw-r--r--pkgs/servers/neard/default.nix2
-rw-r--r--pkgs/tools/X11/xpra/default.nix2
-rw-r--r--pkgs/tools/audio/mpdris2/default.nix8
-rw-r--r--pkgs/tools/bluetooth/blueman/default.nix2
-rw-r--r--pkgs/tools/misc/system-config-printer/default.nix2
-rw-r--r--pkgs/tools/networking/connman-notify/default.nix2
-rw-r--r--pkgs/tools/networking/wicd/default.nix12
-rw-r--r--pkgs/top-level/all-packages.nix28
-rw-r--r--pkgs/top-level/python-packages.nix15
45 files changed, 166 insertions, 171 deletions
diff --git a/pkgs/applications/audio/a2jmidid/default.nix b/pkgs/applications/audio/a2jmidid/default.nix
index 7b0aad152ab..35954471877 100644
--- a/pkgs/applications/audio/a2jmidid/default.nix
+++ b/pkgs/applications/audio/a2jmidid/default.nix
@@ -1,7 +1,9 @@
 { stdenv, fetchurl, makeWrapper, pkgconfig, alsaLib, dbus, libjack2
-, python, pythonDBus }:
+, pythonPackages}:
 
-stdenv.mkDerivation rec {
+let
+  inherit (pythonPackages) python dbus-python;
+in stdenv.mkDerivation rec {
   name = "a2jmidid-${version}";
   version = "8";
 
@@ -10,14 +12,14 @@ stdenv.mkDerivation rec {
     sha256 = "0pzm0qk5ilqhwz74pydg1jwrds27vm47185dakdrxidb5bv3b5ia";
   };
 
-  buildInputs = [ makeWrapper pkgconfig alsaLib dbus libjack2 python pythonDBus ];
+  buildInputs = [ makeWrapper pkgconfig alsaLib dbus libjack2 python dbus-python ];
 
-  configurePhase = "python waf configure --prefix=$out";
+  configurePhase = "${python.interpreter} waf configure --prefix=$out";
 
-  buildPhase = "python waf";
+  buildPhase = "${python.interpreter} waf";
 
   installPhase = ''
-    python waf install
+    ${python.interpreter} waf install
     wrapProgram $out/bin/a2j_control --set PYTHONPATH $PYTHONPATH
   '';
 
diff --git a/pkgs/applications/audio/gpodder/default.nix b/pkgs/applications/audio/gpodder/default.nix
index 7b724ca3d01..8e9476cd3d8 100644
--- a/pkgs/applications/audio/gpodder/default.nix
+++ b/pkgs/applications/audio/gpodder/default.nix
@@ -1,11 +1,10 @@
-{ stdenv, fetchurl, buildPythonApplication, pythonPackages, mygpoclient, intltool
+{ stdenv, fetchurl, pythonPackages, mygpoclient, intltool
 , ipodSupport ? true, libgpod
 , gnome3
 }:
 
-buildPythonApplication rec {
+pythonPackages.buildPythonApplication rec {
   name = "gpodder-${version}";
-  namePrefix = "";
 
   version = "3.9.0";
 
@@ -31,7 +30,7 @@ buildPythonApplication rec {
   ];
 
   propagatedBuildInputs = with pythonPackages; [
-    feedparser dbus mygpoclient sqlite3 pygtk eyeD3
+    feedparser dbus-python mygpoclient sqlite3 pygtk eyeD3
   ] ++ stdenv.lib.optional ipodSupport libgpod;
 
   checkPhase = ''
diff --git a/pkgs/applications/audio/mopidy/default.nix b/pkgs/applications/audio/mopidy/default.nix
index 5feabbf4206..af37d859c7f 100644
--- a/pkgs/applications/audio/mopidy/default.nix
+++ b/pkgs/applications/audio/mopidy/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, pythonPackages, pygobject3, wrapGAppsHook
+{ stdenv, fetchFromGitHub, pythonPackages, wrapGAppsHook
 , gst_all_1, glib_networking, gobjectIntrospection
 }:
 
@@ -22,7 +22,7 @@ pythonPackages.buildPythonApplication rec {
   ];
 
   propagatedBuildInputs = with pythonPackages; [
-    gst-python pygobject3 pykka tornado requests2 dbus
+    gst-python pygobject3 pykka tornado requests2 dbus-python
   ];
 
   # There are no tests
diff --git a/pkgs/applications/audio/quodlibet/default.nix b/pkgs/applications/audio/quodlibet/default.nix
index 5aaa3195c45..a046fe80e13 100644
--- a/pkgs/applications/audio/quodlibet/default.nix
+++ b/pkgs/applications/audio/quodlibet/default.nix
@@ -1,5 +1,5 @@
-{ stdenv, fetchurl, python, buildPythonApplication, mutagen, pygtk, pygobject, intltool
-, pythonDBus, gst_python, withGstPlugins ? false, gst_plugins_base ? null
+{ stdenv, fetchurl, pythonPackages, intltool
+, gst_python, withGstPlugins ? false, gst_plugins_base ? null
 , gst_plugins_good ? null, gst_plugins_ugly ? null, gst_plugins_bad ? null }:
 
 assert withGstPlugins -> gst_plugins_base != null
@@ -7,12 +7,12 @@ assert withGstPlugins -> gst_plugins_base != null
                          || gst_plugins_ugly != null
                          || gst_plugins_bad != null;
 
-let version = "2.6.3"; in
-
-buildPythonApplication {
+let
+  version = "2.6.3";
+  inherit (pythonPackages) buildPythonApplication python mutagen pygtk pygobject dbus-python;
+in buildPythonApplication {
   # call the package quodlibet and just quodlibet
   name = "quodlibet${stdenv.lib.optionalString withGstPlugins "-with-gst-plugins"}-${version}";
-  namePrefix = "";
 
   # XXX, tests fail
   doCheck = false;
@@ -48,7 +48,7 @@ buildPythonApplication {
   ];
 
   propagatedBuildInputs = [
-    mutagen pygtk pygobject pythonDBus gst_python intltool
+    mutagen pygtk pygobject dbus-python gst_python intltool
   ];
 
   postInstall = stdenv.lib.optionalString withGstPlugins ''
diff --git a/pkgs/applications/audio/sonata/default.nix b/pkgs/applications/audio/sonata/default.nix
index e23a5404368..2acafb0be63 100644
--- a/pkgs/applications/audio/sonata/default.nix
+++ b/pkgs/applications/audio/sonata/default.nix
@@ -1,14 +1,11 @@
-{ pkgs, stdenv, fetchFromGitHub, pkgconfig, intltool, wrapGAppsHook,
-  python, buildPythonApplication, isPy3k,
-  gnome3, gtk3, gobjectIntrospection,
-  dbus, pygobject3, mpd2 }:
+{ lib, stdenv, fetchFromGitHub, pkgconfig, intltool, wrapGAppsHook
+, python3Packages, gnome3, gtk3, gobjectIntrospection}:
 
-with pkgs.lib;
-
-buildPythonApplication rec {
+let
+  inherit (python3Packages) buildPythonApplication python isPy3k dbus-python pygobject3 mpd2;
+in buildPythonApplication rec {
   name = "sonata-${version}";
   version = "1.7b1";
-  namePrefix = "";
 
   src = fetchFromGitHub {
     owner = "multani";
@@ -38,7 +35,7 @@ buildPythonApplication rec {
 
   # The optional tagpy dependency (for editing metadata) is not yet
   # included because it's difficult to build.
-  pythonPath = [ dbus pygobject3 mpd2 ];
+  pythonPath = [ dbus-python pygobject3 mpd2 ];
 
   meta = {
     description = "An elegant client for the Music Player Daemon";
diff --git a/pkgs/applications/misc/batti/default.nix b/pkgs/applications/misc/batti/default.nix
index a2b3c15f044..14416c24d23 100644
--- a/pkgs/applications/misc/batti/default.nix
+++ b/pkgs/applications/misc/batti/default.nix
@@ -1,10 +1,11 @@
 { stdenv, fetchurl
-, pkgconfig, gettext, python
-, gtk, pygtk, dbus_python
-, gdk_pixbuf, upower
+, pkgconfig, gettext, pythonPackages
+, gtk, gdk_pixbuf, upower
 , makeWrapper }:
 
-stdenv.mkDerivation rec {
+let
+  inherit (pythonPackages) dbus-python pygtk python;
+in stdenv.mkDerivation rec {
 
   name = "batti-${version}";
   version = "0.3.8";
@@ -15,7 +16,7 @@ stdenv.mkDerivation rec {
   };
 
   buildInputs = with stdenv.lib;
-  [ pkgconfig gettext python gtk pygtk dbus_python gdk_pixbuf upower makeWrapper ];
+  [ pkgconfig gettext python gtk pygtk dbus-python gdk_pixbuf upower makeWrapper ];
 
   configurePhase = "true";
 
diff --git a/pkgs/applications/misc/cherrytree/default.nix b/pkgs/applications/misc/cherrytree/default.nix
index 72049c21b12..4198a9f32b2 100644
--- a/pkgs/applications/misc/cherrytree/default.nix
+++ b/pkgs/applications/misc/cherrytree/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, python, pythonPackages, gettext, pygtksourceview, sqlite }:
+{ stdenv, fetchurl, pythonPackages, gettext, sqlite }:
 
 with stdenv.lib;
 stdenv.mkDerivation rec {
@@ -15,10 +15,10 @@ stdenv.mkDerivation rec {
   [ sqlite3 ];
 
   buildInputs = with pythonPackages;
-  [ python gettext wrapPython pygtk dbus pygtksourceview ];
+  [ python gettext wrapPython pygtk dbus-python pygtksourceview ];
 
   pythonPath = with pythonPackages;
-  [ pygtk dbus pygtksourceview ];
+  [ pygtk dbus-python pygtksourceview ];
 
   patches = [ ./subprocess.patch ];
 
diff --git a/pkgs/applications/misc/guake/default.nix b/pkgs/applications/misc/guake/default.nix
index d0ec7b704ac..21a551bd631 100644
--- a/pkgs/applications/misc/guake/default.nix
+++ b/pkgs/applications/misc/guake/default.nix
@@ -11,12 +11,14 @@ gconftool-2 --recursive-unset /apps/guake
 */
 { stdenv, fetchurl, lib
 , pkgconfig, libtool, intltool, makeWrapper
-, dbus, gtk2, gconf, python2, python2Packages, libutempter, vte, keybinder, gnome2, gnome3 }:
+, dbus, gtk2, gconf, python2Packages, libutempter, vte, keybinder, gnome2, gnome3 }:
 
 with lib;
 
-let inputs = [ dbus gtk2 gconf python2 libutempter vte keybinder gnome3.gnome_common ];
-    pyPath = makeSearchPathOutput "lib" python2.sitePackages (attrVals [ "dbus" "notify" "pyGtkGlade" "pyxdg" ] python2Packages ++ [ gnome2.gnome_python ]);
+let
+  inherit (python2Packages) python;
+  inputs = [ dbus gtk2 gconf python libutempter vte keybinder gnome3.gnome_common ];
+  pyPath = makeSearchPathOutput "lib" python.sitePackages (attrVals [ "dbus-python" "notify" "pyGtkGlade" "pyxdg" ] python2Packages ++ [ gnome2.gnome_python ]);
  in stdenv.mkDerivation rec {
   name = "guake-${version}";
   version = "0.8.3";
@@ -60,11 +62,11 @@ let inputs = [ dbus gtk2 gconf python2 libutempter vte keybinder gnome3.gnome_co
   postFixup = ''
     for bin in $out/bin/{guake,guake-prefs}; do
       substituteInPlace $bin \
-        --replace '/usr/bin/env python2' ${python2}/bin/python2
+        --replace '/usr/bin/env python2' ${python.interpreter}
       wrapProgram $bin \
         --prefix XDG_DATA_DIRS : "$out/share:$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH" \
         --prefix LD_LIBRARY_PATH : ${makeLibraryPath inputs} \
-        --prefix PYTHONPATH : "$out/${python2.sitePackages}:${pyPath}:$PYTHONPATH"
+        --prefix PYTHONPATH : "$out/${python.sitePackages}:${pyPath}:$PYTHONPATH"
     done
   '';
 
diff --git a/pkgs/applications/misc/hamster-time-tracker/default.nix b/pkgs/applications/misc/hamster-time-tracker/default.nix
index 1732a7e1fb0..aa6a4bd689a 100644
--- a/pkgs/applications/misc/hamster-time-tracker/default.nix
+++ b/pkgs/applications/misc/hamster-time-tracker/default.nix
@@ -1,5 +1,5 @@
-{ stdenv, fetchzip, buildPythonApplication, docbook2x, libxslt, gnome_doc_utils
-, intltool, dbus_glib, pygobject, pygtk, pyxdg, gnome_python, dbus, sqlite3
+{ stdenv, fetchzip, pythonPackages, docbook2x, libxslt, gnome_doc_utils
+, intltool, dbus_glib, gnome_python, dbus
 , hicolor_icon_theme
 }:
 
@@ -8,9 +8,8 @@
 #
 #   WARNING:root:Could not import wnck - workspace tracking will be disabled
 
-buildPythonApplication rec {
+pythonPackages.buildPythonApplication rec {
   name = "hamster-time-tracker-1.04";
-  namePrefix = "";
 
   src = fetchzip {
     name = "${name}-src";
@@ -22,7 +21,7 @@ buildPythonApplication rec {
     docbook2x libxslt gnome_doc_utils intltool dbus_glib hicolor_icon_theme
   ];
 
-  propagatedBuildInputs = [ pygobject pygtk pyxdg gnome_python dbus sqlite3 ];
+  propagatedBuildInputs = with pythonPackages; [ pygobject pygtk pyxdg gnome_python dbus-python sqlite3 ];
 
   configurePhase = ''
     python waf configure --prefix="$out"
diff --git a/pkgs/applications/misc/printrun/default.nix b/pkgs/applications/misc/printrun/default.nix
index 27a55f4464f..34144e35bd5 100644
--- a/pkgs/applications/misc/printrun/default.nix
+++ b/pkgs/applications/misc/printrun/default.nix
@@ -11,7 +11,7 @@ python27Packages.buildPythonApplication rec {
   };
 
   propagatedBuildInputs = with python27Packages; [
-    wxPython30 pyserial dbus psutil numpy pyopengl pyglet cython
+    wxPython30 pyserial dbus-python psutil numpy pyopengl pyglet cython
   ];
 
   doCheck = false;
diff --git a/pkgs/applications/networking/instant-messengers/gajim/default.nix b/pkgs/applications/networking/instant-messengers/gajim/default.nix
index b6adcfc1910..e7ebcf149e1 100644
--- a/pkgs/applications/networking/instant-messengers/gajim/default.nix
+++ b/pkgs/applications/networking/instant-messengers/gajim/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl, python, intltool, pkgconfig, libX11, gtk
-, ldns, pythonDBus, pythonPackages
+, ldns, pythonPackages
 
 , enableJingle ? true, farstream ? null, gst_plugins_bad ? null
 ,                      libnice ? null
@@ -58,7 +58,7 @@ stdenv.mkDerivation rec {
     pythonPackages.sqlite3 pythonPackages.pyasn1
     pythonPackages.pyxdg
     pythonPackages.nbxmpp
-    pythonPackages.pyopenssl pythonDBus
+    pythonPackages.pyopenssl pythonPackages.dbus-python
   ] ++ optionals enableJingle [ farstream gst_plugins_bad libnice ]
     ++ optional enableE2E pythonPackages.pycrypto
     ++ optional enableRST pythonPackages.docutils
diff --git a/pkgs/applications/networking/instant-messengers/salut-a-toi/default.nix b/pkgs/applications/networking/instant-messengers/salut-a-toi/default.nix
index 326774dc1fe..d442addaeaa 100644
--- a/pkgs/applications/networking/instant-messengers/salut-a-toi/default.nix
+++ b/pkgs/applications/networking/instant-messengers/salut-a-toi/default.nix
@@ -1,5 +1,8 @@
-{stdenv, fetchurl, python, pythonPackages, pygobject, pythonDBus}: 
-stdenv.mkDerivation rec {
+{stdenv, fetchurl, pythonPackages}:
+
+let
+  inherit (pythonPackages) python;
+in stdenv.mkDerivation rec {
   url = "ftp://ftp.goffi.org/sat/sat-0.2.0.tar.bz2";
   name = stdenv.lib.nameFromURL url ".tar";
   src = fetchurl {
@@ -10,28 +13,28 @@ stdenv.mkDerivation rec {
   buildInputs = with pythonPackages; 
     [
       python twisted urwid beautifulsoup wxPython pygobject
-      wokkel pythonDBus pyfeed wrapPython setuptools
+      wokkel dbus-python pyfeed wrapPython setuptools
     ];
 
   configurePhase = ''
     sed -i "/use_setuptools/d" setup.py
     sed -e "s@sys.prefix@'$out'@g" -i setup.py
     sed -e "1aexport PATH=\"\$PATH\":\"$out/bin\":\"${pythonPackages.twisted}/bin\"" -i src/sat.sh
-    sed -e "1aexport PYTHONPATH=\"\$PYTHONPATHPATH\":\"$PYTHONPATH\":"$out/lib/${python.libPrefix}/site-packages"" -i src/sat.sh
+    sed -e "1aexport PYTHONPATH=\"\$PYTHONPATHPATH\":\"$PYTHONPATH\":"$out/${python.sitePackages}"" -i src/sat.sh
 
     echo 'import wokkel.muc' | python 
   '';
 
   buildPhase = ''
-    python setup.py build
+    ${python.interpreter}setup.py build
   '';
 
   installPhase = ''
-    python setup.py install --prefix="$out" 
+    ${python.interpreter} setup.py install --prefix="$out"
 
     for i in "$out/bin"/*; do
       head -n 1 "$i" | grep -E '[/ ]python( |$)' && {
-        wrapProgram "$i" --prefix PYTHONPATH : "$PYTHONPATH:$out/lib/${python.libPrefix}/site-packages"
+        wrapProgram "$i" --prefix PYTHONPATH : "$PYTHONPATH:$out/${python.sitePackages}"
       } || true 
     done
   '';
diff --git a/pkgs/applications/networking/mailreaders/mailnag/default.nix b/pkgs/applications/networking/mailreaders/mailnag/default.nix
index 673856e062a..bf3f6296acc 100644
--- a/pkgs/applications/networking/mailreaders/mailnag/default.nix
+++ b/pkgs/applications/networking/mailreaders/mailnag/default.nix
@@ -1,9 +1,9 @@
-{ stdenv, buildPythonApplication, fetchurl, gettext, gtk3, pythonPackages
+{ stdenv, fetchurl, gettext, gtk3, pythonPackages
 , gdk_pixbuf, libnotify, gst_all_1
 , libgnome_keyring3 ? null, networkmanager ? null
 }:
 
-buildPythonApplication rec {
+pythonPackages.buildPythonApplication rec {
   name = "mailnag-${version}";
   version = "1.1.0";
 
@@ -13,7 +13,7 @@ buildPythonApplication rec {
   };
 
   buildInputs = [
-    gettext gtk3 pythonPackages.pygobject3 pythonPackages.dbus
+    gettext gtk3 pythonPackages.pygobject3 pythonPackages.dbus-python
     pythonPackages.pyxdg gdk_pixbuf libnotify gst_all_1.gstreamer
     gst_all_1.gst-plugins-base gst_all_1.gst-plugins-good
     gst_all_1.gst-plugins-bad libgnome_keyring3 networkmanager
diff --git a/pkgs/applications/networking/sync/backintime/common.nix b/pkgs/applications/networking/sync/backintime/common.nix
index c3f8e0f02c6..c1907c44e58 100644
--- a/pkgs/applications/networking/sync/backintime/common.nix
+++ b/pkgs/applications/networking/sync/backintime/common.nix
@@ -1,6 +1,8 @@
-{stdenv, fetchFromGitHub, makeWrapper, gettext, python3, python3Packages, rsync, cron, openssh, sshfsFuse, encfs }:
+{stdenv, fetchFromGitHub, makeWrapper, gettext, python3Packages, rsync, cron, openssh, sshfsFuse, encfs }:
 
-stdenv.mkDerivation rec {
+let
+  inherit (python3Packages) python dbus-python keyring;
+in stdenv.mkDerivation rec {
   version = "1.1.12";
 
   name = "backintime-common-${version}";
@@ -12,7 +14,7 @@ stdenv.mkDerivation rec {
     sha256 = "0n3x48wa8aa7i8fff85h3b5h3xpabk51ld0ymy3pkqh0krfgs59a";
   };
 
-  buildInputs = [ makeWrapper gettext python3 python3Packages.dbus python3Packages.keyring openssh cron rsync sshfsFuse encfs ];
+  buildInputs = [ makeWrapper gettext python dbus-python keyring openssh cron rsync sshfsFuse encfs ];
 
   installFlags = [ "DEST=$(out)" ];
 
diff --git a/pkgs/applications/version-management/rabbitvcs/default.nix b/pkgs/applications/version-management/rabbitvcs/default.nix
index 0f2f7646ac6..212151b6c4a 100644
--- a/pkgs/applications/version-management/rabbitvcs/default.nix
+++ b/pkgs/applications/version-management/rabbitvcs/default.nix
@@ -11,7 +11,7 @@ python2Packages.buildPythonApplication rec {
     sha256 = "0964pdylrx4n9c9l8ncwv4q1p63y4hadb5v4pgvm0m2fah2jlkly";
   };
 
-  pythonPath = with python2Packages; [ configobj dbus pygobject pygtk simplejson pysvn dulwich tkinter gvfs xdg_utils ];
+  pythonPath = with python2Packages; [ configobj dbus-python pygobject pygtk simplejson pysvn dulwich tkinter gvfs xdg_utils ];
 
   prePatch = ''
       sed -ie 's|if sys\.argv\[1\] == "install":|if False:|' ./setup.py
diff --git a/pkgs/applications/video/devede/default.nix b/pkgs/applications/video/devede/default.nix
index ce44377260e..824ef9661b8 100644
--- a/pkgs/applications/video/devede/default.nix
+++ b/pkgs/applications/video/devede/default.nix
@@ -1,7 +1,7 @@
-{ pkgs, stdenv, fetchurl, pythonPackages, buildPythonApplication, pygtk, ffmpeg, mplayer, vcdimager, cdrkit, dvdauthor }:
+{ pkgs, stdenv, fetchurl, pythonPackages, ffmpeg, mplayer, vcdimager, cdrkit, dvdauthor }:
 
 let
-  inherit (pythonPackages) dbus;
+  inherit (pythonPackages) dbus-python buildPythonApplication pygtk;
 
 in buildPythonApplication rec {
   name = "devede-3.23.0";
@@ -14,7 +14,7 @@ in buildPythonApplication rec {
 
   buildInputs = [ ffmpeg ];
 
-  propagatedBuildInputs = [ pygtk dbus ffmpeg mplayer dvdauthor vcdimager cdrkit ];
+  propagatedBuildInputs = [ pygtk dbus-python ffmpeg mplayer dvdauthor vcdimager cdrkit ];
 
   postPatch = ''
     substituteInPlace devede --replace "/usr/share/devede" "$out/share/devede"
diff --git a/pkgs/applications/video/kazam/default.nix b/pkgs/applications/video/kazam/default.nix
index 6f0a811fe82..9113ff75bfd 100644
--- a/pkgs/applications/video/kazam/default.nix
+++ b/pkgs/applications/video/kazam/default.nix
@@ -16,11 +16,11 @@ python3Packages.buildPythonApplication rec {
   buildInputs = with python3Packages;
     [ pygobject3 pyxdg pycairo gst_all_1.gstreamer gst_all_1.gst-plugins-base
       gst_all_1.gst-plugins-good gobjectIntrospection gtk3 libwnck3 distutils_extra
-      intltool dbus ];
+      intltool dbus-python ];
 
   # TODO: figure out why PYTHONPATH is not passed automatically for those programs
   pythonPath = with python3Packages;
-    [ pygobject3 pyxdg pycairo dbus ];
+    [ pygobject3 pyxdg pycairo dbus-python ];
 
   patches = [ ./datadir.patch ./bug_1190693.patch ];
   prePatch = ''
diff --git a/pkgs/applications/video/miro/default.nix b/pkgs/applications/video/miro/default.nix
index 266f3978b99..2a45c1a9eb2 100644
--- a/pkgs/applications/video/miro/default.nix
+++ b/pkgs/applications/video/miro/default.nix
@@ -75,7 +75,7 @@ in buildPythonApplication rec {
   ];
 
   propagatedBuildInputs = with pythonPackages; [
-    pygobject pygtk pycurl sqlite3 mutagen pycairo dbus
+    pygobject pygtk pycurl sqlite3 mutagen pycairo dbus-python
     pywebkitgtk] ++ [ libtorrentRasterbar
     gst_python gst_plugins_base gst_plugins_good gst_ffmpeg
   ] ++ optional enableBonjour avahi;
diff --git a/pkgs/applications/video/pitivi/default.nix b/pkgs/applications/video/pitivi/default.nix
index 4a831fe110f..d487f07e3d6 100644
--- a/pkgs/applications/video/pitivi/default.nix
+++ b/pkgs/applications/video/pitivi/default.nix
@@ -43,7 +43,7 @@ in stdenv.mkDerivation rec {
     gst-plugins-bad gst-plugins-ugly gst-libav gst-validate
   ]) ++ (with python3Packages; [
     python pygobject3 gst-python pyxdg numpy pycairo sqlite3 matplotlib
-    dbus
+    dbus-python
   ]);
 
   meta = with stdenv.lib; {
diff --git a/pkgs/applications/virtualization/virt-manager/default.nix b/pkgs/applications/virtualization/virt-manager/default.nix
index 1a0f8f93625..5cda21066b5 100644
--- a/pkgs/applications/virtualization/virt-manager/default.nix
+++ b/pkgs/applications/virtualization/virt-manager/default.nix
@@ -1,5 +1,5 @@
-{ stdenv, fetchurl, pythonPackages, intltool, libxml2Python, curl, python
-, wrapGAppsHook, virtinst, pyGtkGlade, pythonDBus, gnome_python, gtkvnc, vte
+{ stdenv, fetchurl, pythonPackages, intltool, libxml2Python, curl
+, wrapGAppsHook, virtinst, gnome_python, gtkvnc, vte
 , gtk3, gobjectIntrospection, libvirt-glib, gsettings_desktop_schemas, glib
 , avahi, dconf, spiceSupport ? true, spice_gtk, libosinfo, gnome3, system-libvirt
 }:
@@ -21,7 +21,7 @@ buildPythonApplication rec {
     [ eventlet greenlet gflags netaddr carrot routes
       PasteDeploy m2crypto ipy twisted
       distutils_extra simplejson readline glanceclient cheetah lockfile httplib2
-      urlgrabber virtinst pyGtkGlade pythonDBus gnome_python pygobject3
+      urlgrabber virtinst pyGtkGlade dbus-python gnome_python pygobject3
       libvirt libxml2Python ipaddr vte libosinfo gobjectIntrospection gtk3 mox
       gtkvnc libvirt-glib glib gsettings_desktop_schemas gnome3.defaultIconTheme
       wrapGAppsHook
diff --git a/pkgs/applications/window-managers/compiz/default.nix b/pkgs/applications/window-managers/compiz/default.nix
index 09c36835dad..46b8c8affc7 100644
--- a/pkgs/applications/window-managers/compiz/default.nix
+++ b/pkgs/applications/window-managers/compiz/default.nix
@@ -1,17 +1,19 @@
-{stdenv, fetchurl, cmake, pkgconfig
+{ stdenv, fetchurl, cmake, pkgconfig
 , libXrender, renderproto, gtk, libwnck, pango, cairo
 , GConf, libXdamage, damageproto, libxml2, libxslt, glibmm
 , metacity
 , libstartup_notification, libpthreadstubs, libxcb, intltool
 , ORBit2, libXau, libICE, libSM
 , dbus, dbus_glib, librsvg, mesa
-, libXdmcp, libnotify, python
-, hicolor_icon_theme, libjpeg_turbo, libsigcxx, protobuf, pygtk, pythonDBus
+, libXdmcp, libnotify, pythonPackages
+, hicolor_icon_theme, libjpeg_turbo, libsigcxx, protobuf
 , xdg_utils
 , gettext, boost, pyrex
 , makeWrapper
 }:
 let
+  inherit (pythonPackages) python dbus-python pygtk;
+
   s = # Generated upstream information
   rec {
     baseName="compiz";
@@ -29,7 +31,7 @@ let
     ORBit2 libXau libICE libSM
     dbus dbus_glib librsvg mesa
     libXdmcp libnotify python
-    hicolor_icon_theme libjpeg_turbo libsigcxx protobuf pygtk pythonDBus
+    hicolor_icon_theme libjpeg_turbo libsigcxx protobuf pygtk dbus-python
     xdg_utils
     gettext boost pyrex
     makeWrapper 
diff --git a/pkgs/desktops/enlightenment/econnman.nix b/pkgs/desktops/enlightenment/econnman.nix
index 0dabd7f1347..9cde3cf4594 100644
--- a/pkgs/desktops/enlightenment/econnman.nix
+++ b/pkgs/desktops/enlightenment/econnman.nix
@@ -8,7 +8,7 @@ stdenv.mkDerivation rec {
   };
 
   buildInputs = [ makeWrapper pkgconfig efl python2Packages.python python2Packages.wrapPython dbus ];
-  pythonPath = [ python2Packages.pythonefl python2Packages.dbus elementary ];
+  pythonPath = [ python2Packages.pythonefl python2Packages.dbus-python elementary ];
   postInstall = ''
     wrapPythonPrograms
   '';
diff --git a/pkgs/desktops/enlightenment/efl.nix b/pkgs/desktops/enlightenment/efl.nix
index 19079d7793d..fc584b432f1 100644
--- a/pkgs/desktops/enlightenment/efl.nix
+++ b/pkgs/desktops/enlightenment/efl.nix
@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
     gst_all_1.gst-libav libpulseaudio libsndfile xorg.libXcursor xorg.printproto
     xorg.libX11 udev utillinux systemd ];
 
-  propagatedBuildInputs = [ libxkbcommon python27Packages.dbus dbus libjpeg xorg.libXcomposite
+  propagatedBuildInputs = [ libxkbcommon python27Packages.dbus-python dbus libjpeg xorg.libXcomposite
     xorg.libXdamage xorg.libXinerama xorg.libXp xorg.libXtst xorg.libXi xorg.libXext
     bullet xorg.libXScrnSaver xorg.libXrender xorg.libXfixes xorg.libXrandr
     xorg.libxkbfile xorg.libxcb xorg.xcbutilkeysyms openjpeg doxygen expat luajit
diff --git a/pkgs/desktops/gnome-2/bindings/gnome-python/default.nix b/pkgs/desktops/gnome-2/bindings/gnome-python/default.nix
index 41ca17bd5e4..b019951db5f 100644
--- a/pkgs/desktops/gnome-2/bindings/gnome-python/default.nix
+++ b/pkgs/desktops/gnome-2/bindings/gnome-python/default.nix
@@ -1,8 +1,10 @@
-{ stdenv, fetchurl, python, pkgconfig, libgnome, GConf, pygobject, pygtk, glib, gtk, pythonDBus,  gnome_vfs}:
+{ stdenv, fetchurl, pythonPackages, pkgconfig, libgnome, GConf, glib, gtk, gnome_vfs}:
 
 with stdenv.lib;
 
-stdenv.mkDerivation rec {
+let
+  inherit (pythonPackages) python pygobject pygtk dbus-python;
+in stdenv.mkDerivation rec {
   version = "2.28";
   name = "gnome-python-${version}.1";
 
@@ -28,7 +30,7 @@ stdenv.mkDerivation rec {
     cp bonobo/*.{py,defs} $out/share/pygtk/2.0/defs/
   '';
 
-  buildInputs = [ python pkgconfig pygobject pygtk glib gtk GConf libgnome pythonDBus gnome_vfs ];
+  buildInputs = [ python pkgconfig pygobject pygtk glib gtk GConf libgnome dbus-python gnome_vfs ];
 
   doCheck = false;
 
diff --git a/pkgs/desktops/gnome-3/3.20/apps/gnome-music/default.nix b/pkgs/desktops/gnome-3/3.20/apps/gnome-music/default.nix
index f48feb20579..ea8f15fd4e5 100644
--- a/pkgs/desktops/gnome-3/3.20/apps/gnome-music/default.nix
+++ b/pkgs/desktops/gnome-3/3.20/apps/gnome-music/default.nix
@@ -1,5 +1,5 @@
 { stdenv, intltool, fetchurl, gdk_pixbuf, tracker
-, python3, libxml2, python3Packages, libnotify, wrapGAppsHook
+, libxml2, python3Packages, libnotify, wrapGAppsHook
 , pkgconfig, gtk3, glib, cairo
 , makeWrapper, itstool, gnome3, librsvg, gst_all_1 }:
 
@@ -9,9 +9,9 @@ stdenv.mkDerivation rec {
   propagatedUserEnvPkgs = [ gnome3.gnome_themes_standard ];
 
   buildInputs = [ pkgconfig gtk3 glib intltool itstool gnome3.libmediaart
-                  gdk_pixbuf gnome3.defaultIconTheme librsvg python3
+                  gdk_pixbuf gnome3.defaultIconTheme librsvg python3Packages.python
                   gnome3.grilo gnome3.grilo-plugins gnome3.totem-pl-parser libxml2 libnotify
-                  python3Packages.pycairo python3Packages.dbus python3Packages.requests2
+                  python3Packages.pycairo python3Packages.dbus-python python3Packages.requests2
                   python3Packages.pygobject3 gst_all_1.gstreamer gst_all_1.gst-plugins-base
                   gst_all_1.gst-plugins-good gst_all_1.gst-plugins-bad wrapGAppsHook
                   gnome3.gsettings_desktop_schemas makeWrapper tracker ];
diff --git a/pkgs/development/libraries/telepathy/qt/default.nix b/pkgs/development/libraries/telepathy/qt/default.nix
index e3e579eefdb..6c2713c1ebe 100644
--- a/pkgs/development/libraries/telepathy/qt/default.nix
+++ b/pkgs/development/libraries/telepathy/qt/default.nix
@@ -1,7 +1,9 @@
-{ stdenv, fetchurl, cmake, qtbase, pkgconfig, python, dbus_glib, dbus_daemon
-, telepathy_farstream, telepathy_glib, pythonDBus, fetchpatch }:
+{ stdenv, fetchurl, cmake, qtbase, pkgconfig, pythonPackages, dbus_glib, dbus_daemon
+, telepathy_farstream, telepathy_glib, fetchpatch }:
 
-stdenv.mkDerivation rec {
+let
+  inherit (pythonPackages) python dbus-python;
+in stdenv.mkDerivation rec {
   name = "telepathy-qt-0.9.6.1";
 
   src = fetchurl {
@@ -30,7 +32,7 @@ stdenv.mkDerivation rec {
     ];
 
   nativeBuildInputs = [ cmake pkgconfig python ];
-  propagatedBuildInputs = [ qtbase dbus_glib telepathy_farstream telepathy_glib pythonDBus ];
+  propagatedBuildInputs = [ qtbase dbus_glib telepathy_farstream telepathy_glib dbus-python ];
 
   buildInputs = stdenv.lib.optional doCheck dbus_daemon;
 
diff --git a/pkgs/development/python-modules/pyqt/4.x.nix b/pkgs/development/python-modules/pyqt/4.x.nix
index ead5c4ffe9d..0464d64d57b 100644
--- a/pkgs/development/python-modules/pyqt/4.x.nix
+++ b/pkgs/development/python-modules/pyqt/4.x.nix
@@ -1,8 +1,9 @@
-{ stdenv, fetchurl, python, pythonPackages, qt4, pythonDBus, pkgconfig, lndir, makeWrapper }:
+{ stdenv, fetchurl, pythonPackages, qt4, pkgconfig, lndir, makeWrapper }:
 
-let version = "4.11.3";
-in
-stdenv.mkDerivation {
+let
+  version = "4.11.3";
+  inherit (pythonPackages) python dbus-python;
+in stdenv.mkDerivation {
   name = "${python.libPrefix}-PyQt-x11-gpl-${version}";
 
   src = fetchurl {
@@ -12,7 +13,7 @@ stdenv.mkDerivation {
 
   configurePhase = ''
     mkdir -p $out
-    lndir ${pythonDBus} $out
+    lndir ${dbus-python} $out
 
     export PYTHONPATH=$PYTHONPATH:$out/lib/${python.libPrefix}/site-packages
 
diff --git a/pkgs/development/python-modules/pyqt/5.x.nix b/pkgs/development/python-modules/pyqt/5.x.nix
index 69fb6e266ea..7418c4785e9 100644
--- a/pkgs/development/python-modules/pyqt/5.x.nix
+++ b/pkgs/development/python-modules/pyqt/5.x.nix
@@ -1,8 +1,10 @@
-{ stdenv, fetchurl, python, pkgconfig, qtbase, qtsvg, qtwebkit, sip, pythonDBus
+{ stdenv, fetchurl, pythonPackages, pkgconfig, qtbase, qtsvg, qtwebkit
 , lndir, makeWrapper, qmakeHook }:
 
 let
   version = "5.5.1";
+  inherit (pythonPackages) python dbus-python;
+  sip = pythonPackages.sip_4_16;
 in stdenv.mkDerivation {
   name = "${python.libPrefix}-PyQt-${version}";
 
@@ -30,7 +32,7 @@ in stdenv.mkDerivation {
     runHook preConfigure
 
     mkdir -p $out
-    lndir ${pythonDBus} $out
+    lndir ${dbus-python} $out
 
     export PYTHONPATH=$PYTHONPATH:$out/lib/${python.libPrefix}/site-packages
 
diff --git a/pkgs/misc/emulators/cdemu/client.nix b/pkgs/misc/emulators/cdemu/client.nix
index b70e2178844..1cea479fb7b 100644
--- a/pkgs/misc/emulators/cdemu/client.nix
+++ b/pkgs/misc/emulators/cdemu/client.nix
@@ -1,11 +1,11 @@
-{ callPackage, python, dbus_python, intltool, makeWrapper }:
+{ callPackage, pythonPackages, intltool, makeWrapper }:
 let pkg = import ./base.nix {
   version = "3.0.1";
   pkgName = "cdemu-client";
   pkgSha256 = "1kg5m7npdxli93vihhp033hgkvikw5b6fm0qwgvlvdjby7njyyyg";
 };
 in callPackage pkg {
-  buildInputs = [ python dbus_python intltool makeWrapper ];
+  buildInputs = [ pythonPackages.python pythonPackages.dbus-python intltool makeWrapper ];
   drvParams = {
     postFixup = ''
       wrapProgram $out/bin/cdemu \
diff --git a/pkgs/misc/jackaudio/default.nix b/pkgs/misc/jackaudio/default.nix
index 66be12fbc43..06389c01ce0 100644
--- a/pkgs/misc/jackaudio/default.nix
+++ b/pkgs/misc/jackaudio/default.nix
@@ -1,8 +1,8 @@
-{ stdenv, fetchFromGitHub, pkgconfig, python, makeWrapper
+{ stdenv, fetchFromGitHub, pkgconfig, pythonPackages, makeWrapper
 , bash, libsamplerate, libsndfile, readline, gcc
 
 # Optional Dependencies
-, dbus ? null, pythonDBus ? null, libffado ? null, alsaLib ? null
+, dbus ? null, libffado ? null, alsaLib ? null
 , libopus ? null
 
 # Extra options
@@ -11,12 +11,13 @@
 
 with stdenv.lib;
 let
+  inherit (pythonPackages) python dbus-python;
   shouldUsePkg = pkg: if pkg != null && stdenv.lib.any (x: x == stdenv.system) pkg.meta.platforms then pkg else null;
 
   libOnly = prefix == "lib";
 
   optDbus = shouldUsePkg dbus;
-  optPythonDBus = if libOnly then null else shouldUsePkg pythonDBus;
+  optPythonDBus = if libOnly then null else shouldUsePkg dbus-python;
   optLibffado = if libOnly then null else shouldUsePkg libffado;
   optAlsaLib = if libOnly then null else shouldUsePkg alsaLib;
   optLibopus = shouldUsePkg libopus;
diff --git a/pkgs/misc/jackaudio/git.nix b/pkgs/misc/jackaudio/git.nix
index fb47128595e..7deeaadbb10 100644
--- a/pkgs/misc/jackaudio/git.nix
+++ b/pkgs/misc/jackaudio/git.nix
@@ -1,8 +1,8 @@
-{ stdenv, fetchFromGitHub, pkgconfig, python, makeWrapper
+{ stdenv, fetchFromGitHub, pkgconfig, pythonPackages, makeWrapper
 , bash, libsamplerate, libsndfile, readline
 
 # Optional Dependencies
-, dbus ? null, pythonDBus ? null, libffado ? null, alsaLib ? null
+, dbus ? null, libffado ? null, alsaLib ? null
 , libopus ? null
 
 # Extra options
@@ -11,12 +11,13 @@
 
 with stdenv.lib;
 let
+  inherit (pythonPackages) python dbus-python;
   shouldUsePkg = pkg: if pkg != null && stdenv.lib.any (x: x == stdenv.system) pkg.meta.platforms then pkg else null;
 
   libOnly = prefix == "lib";
 
   optDbus = shouldUsePkg dbus;
-  optPythonDBus = if libOnly then null else shouldUsePkg pythonDBus;
+  optPythonDBus = if libOnly then null else shouldUsePkg dbus-python;
   optLibffado = if libOnly then null else shouldUsePkg libffado;
   optAlsaLib = if libOnly then null else shouldUsePkg alsaLib;
   optLibopus = shouldUsePkg libopus;
diff --git a/pkgs/os-specific/linux/bluez/bluez5.nix b/pkgs/os-specific/linux/bluez/bluez5.nix
index f29acaa1354..c08a04ae5f5 100644
--- a/pkgs/os-specific/linux/bluez/bluez5.nix
+++ b/pkgs/os-specific/linux/bluez/bluez5.nix
@@ -1,5 +1,5 @@
-{ stdenv, fetchurl, pkgconfig, dbus, glib, alsaLib, python,
-  pythonPackages, pythonDBus, readline, libsndfile, udev, libical,
+{ stdenv, fetchurl, pkgconfig, dbus, glib, alsaLib,
+  pythonPackages, readline, libsndfile, udev, libical,
   systemd, enableWiimote ? false }:
 
 assert stdenv.isLinux;
@@ -13,10 +13,10 @@ stdenv.mkDerivation rec {
   };
 
   pythonPath = with pythonPackages;
-    [ pythonDBus pygobject pygobject3 recursivePthLoader ];
+    [ dbus pygobject pygobject3 recursivePthLoader ];
 
   buildInputs =
-    [ pkgconfig dbus glib alsaLib python pythonPackages.wrapPython
+    [ pkgconfig dbus glib alsaLib pythonPackages.python pythonPackages.wrapPython
       readline libsndfile udev libical
       # Disables GStreamer; not clear what it gains us other than a
       # zillion extra dependencies.
diff --git a/pkgs/os-specific/linux/bluez/bluez5_28.nix b/pkgs/os-specific/linux/bluez/bluez5_28.nix
index 68db9345bd0..829b383e072 100644
--- a/pkgs/os-specific/linux/bluez/bluez5_28.nix
+++ b/pkgs/os-specific/linux/bluez/bluez5_28.nix
@@ -1,10 +1,12 @@
-{ stdenv, fetchurl, pkgconfig, dbus, glib, alsaLib, python,
-  pythonPackages, pythonDBus, readline, libsndfile, udev, libical,
+{ stdenv, fetchurl, pkgconfig, dbus, glib, alsaLib,
+  pythonPackages, readline, libsndfile, udev, libical,
   systemd, enableWiimote ? false }:
 
 assert stdenv.isLinux;
 
-stdenv.mkDerivation rec {
+let
+  inherit (pythonPackages) python;
+in stdenv.mkDerivation rec {
   name = "bluez-5.28";
    
   src = fetchurl {
@@ -13,7 +15,7 @@ stdenv.mkDerivation rec {
   };
 
   pythonPath = with pythonPackages;
-    [ pythonDBus pygobject pygobject3 recursivePthLoader ];
+    [ dbus pygobject pygobject3 recursivePthLoader ];
 
   buildInputs =
     [ pkgconfig dbus glib alsaLib python pythonPackages.wrapPython
diff --git a/pkgs/os-specific/linux/bluez/default.nix b/pkgs/os-specific/linux/bluez/default.nix
index ea979ed0c22..9943a1de6d4 100644
--- a/pkgs/os-specific/linux/bluez/default.nix
+++ b/pkgs/os-specific/linux/bluez/default.nix
@@ -1,14 +1,13 @@
-{ stdenv, fetchurl, pkgconfig, dbus, glib, libusb, alsaLib, python, makeWrapper
-, pythonDBus, pygobject, readline, libsndfile }:
+{ stdenv, fetchurl, pkgconfig, dbus, glib, libusb, alsaLib, pythonPackages, makeWrapper
+, readline, libsndfile }:
 
 assert stdenv.isLinux;
 
 let
-  pythonpath = "${pythonDBus}/lib/${python.libPrefix}/site-packages:"
-    + "${pygobject}/lib/${python.libPrefix}/site-packages";
-in
-   
-stdenv.mkDerivation rec {
+  inherit (pythonPackages) python;
+  pythonpath = "${pythonPackages.dbus}/lib/${python.libPrefix}/site-packages:"
+    + "${pythonPackages.pygobject}/lib/${python.libPrefix}/site-packages";
+in stdenv.mkDerivation rec {
   name = "bluez-4.101";
    
   src = fetchurl {
diff --git a/pkgs/os-specific/linux/ffado/default.nix b/pkgs/os-specific/linux/ffado/default.nix
index b0f545b2171..ff259dcfbb0 100644
--- a/pkgs/os-specific/linux/ffado/default.nix
+++ b/pkgs/os-specific/linux/ffado/default.nix
@@ -3,7 +3,7 @@
 
 # Optional dependencies
 , libjack2 ? null, dbus ? null, dbus_cplusplus ? null, alsaLib ? null
-, pyqt4 ? null, pythonDBus ? null, xdg_utils ? null
+, pyqt4 ? null, dbus-python ? null, xdg_utils ? null
 
 # Other Flags
 , prefix ? ""
@@ -20,7 +20,7 @@ let
   optDbus_cplusplus = shouldUsePkg dbus_cplusplus;
   optAlsaLib = shouldUsePkg alsaLib;
   optPyqt4 = shouldUsePkg pyqt4;
-  optPythonDBus = shouldUsePkg pythonDBus;
+  optPythonDBus = shouldUsePkg dbus-python;
   optXdg_utils = shouldUsePkg xdg_utils;
 in
 stdenv.mkDerivation rec {
diff --git a/pkgs/os-specific/linux/pam_usb/default.nix b/pkgs/os-specific/linux/pam_usb/default.nix
index 67d9894a2a0..a96e951bf9b 100644
--- a/pkgs/os-specific/linux/pam_usb/default.nix
+++ b/pkgs/os-specific/linux/pam_usb/default.nix
@@ -1,8 +1,9 @@
-{stdenv, fetchurl, makeWrapper, useSetUID, dbus, libxml2, pam, pkgconfig, pmount, python, pythonDBus}:
+{stdenv, fetchurl, makeWrapper, useSetUID, dbus, libxml2, pam, pkgconfig, pmount, pythonPackages}:
 
 let
   pmountBin = useSetUID pmount "/bin/pmount";
   pumountBin = useSetUID pmount "/bin/pumount";
+  inherit (pythonPackages) python dbus-python;
 in
 
 stdenv.mkDerivation rec {
@@ -36,7 +37,7 @@ stdenv.mkDerivation rec {
     for prog in $out/bin/pamusb-conf $out/bin/pamusb-agent; do
       substituteInPlace $prog --replace '/usr/bin/env python' '/bin/python'
       wrapProgram $prog \
-        --prefix PYTHONPATH : "$(toPythonPath ${pythonDBus})"
+        --prefix PYTHONPATH : "$(toPythonPath ${dbus-python})"
     done
   '';
 
diff --git a/pkgs/servers/neard/default.nix b/pkgs/servers/neard/default.nix
index b96fa684bfa..665e2ee8ed5 100644
--- a/pkgs/servers/neard/default.nix
+++ b/pkgs/servers/neard/default.nix
@@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
   };
 
   buildInputs = [ autoreconfHook pkgconfig systemd glib dbus libnl pythonPackages.python pythonPackages.wrapPython ];
-  pythonPath = [ pythonPackages.pygobject pythonPackages.dbus pythonPackages.pygtk ];
+  pythonPath = [ pythonPackages.pygobject pythonPackages.dbus-python pythonPackages.pygtk ];
 
   configureFlags = [ "--disable-debug" "--enable-tools" "--enable-ese" "--with-systemdsystemunitdir=$out/lib/systemd/system" ];
 
diff --git a/pkgs/tools/X11/xpra/default.nix b/pkgs/tools/X11/xpra/default.nix
index 27a3deca736..3a2c460160a 100644
--- a/pkgs/tools/X11/xpra/default.nix
+++ b/pkgs/tools/X11/xpra/default.nix
@@ -30,7 +30,7 @@ in buildPythonApplication rec {
   ];
 
   propagatedBuildInputs = with pythonPackages; [
-    pillow pygtk pygobject rencode pycrypto cryptography pycups lz4 dbus
+    pillow pygtk pygobject rencode pycrypto cryptography pycups lz4 dbus-python
   ];
 
   preBuild = ''
diff --git a/pkgs/tools/audio/mpdris2/default.nix b/pkgs/tools/audio/mpdris2/default.nix
index 82ddc85fd88..beb69db8581 100644
--- a/pkgs/tools/audio/mpdris2/default.nix
+++ b/pkgs/tools/audio/mpdris2/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl, autoreconfHook, intltool
-, python, wrapPython, mpd, pygtk, dbus, pynotify
+, pythonPackages, pythonFull
 }:
 
 stdenv.mkDerivation rec {
@@ -11,9 +11,9 @@ stdenv.mkDerivation rec {
     sha256 = "0zdmamj2ldhr6y3s464w8y2x3yizda784jnlrg3j3myfabssisvz";
   };
 
-  buildInputs = [ intltool autoreconfHook ];
-  propagatedBuildInputs = [ python wrapPython ];
-  pythonPath = [ mpd pygtk dbus pynotify ];
+  buildInputs = [ intltool autoreconfHook pythonPackages.wrapPython ];
+  propagatedBuildInputs = with pythonPackages; [ pythonFull  pygtk dbus-python ];
+  pythonPath = with pythonPackages; [ mpd pygtk dbus-python notify ];
   postInstall = "wrapPythonPrograms";
 
   meta = with stdenv.lib; {
diff --git a/pkgs/tools/bluetooth/blueman/default.nix b/pkgs/tools/bluetooth/blueman/default.nix
index 31020656867..7edf2ac3e89 100644
--- a/pkgs/tools/bluetooth/blueman/default.nix
+++ b/pkgs/tools/bluetooth/blueman/default.nix
@@ -24,7 +24,7 @@ in stdenv.mkDerivation rec {
     sed -i 's,CDLL(",CDLL("${libpulseaudio}/lib/,g' blueman/main/PulseAudioUtils.py
   '';
 
-  pythonPath = with pythonPackages; [ dbus pygobject3 ];
+  pythonPath = with pythonPackages; [ dbus-python pygobject3 ];
 
   propagatedUserEnvPkgs = [ obex_data_server dconf ];
 
diff --git a/pkgs/tools/misc/system-config-printer/default.nix b/pkgs/tools/misc/system-config-printer/default.nix
index d16fdd4e605..67ec9585c7a 100644
--- a/pkgs/tools/misc/system-config-printer/default.nix
+++ b/pkgs/tools/misc/system-config-printer/default.nix
@@ -26,7 +26,7 @@ in stdenv.mkDerivation rec {
     ];
 
   pythonPath = with pythonPackages;
-    [ pycups pycurl dbus pygobject3 requests2 ];
+    [ pycups pycurl dbus-python pygobject3 requests2 ];
 
   configureFlags =
     [ "--with-udev-rules"
diff --git a/pkgs/tools/networking/connman-notify/default.nix b/pkgs/tools/networking/connman-notify/default.nix
index 07066690172..4f70888fca6 100644
--- a/pkgs/tools/networking/connman-notify/default.nix
+++ b/pkgs/tools/networking/connman-notify/default.nix
@@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
 
   buildInputs = [
     pythonPackages.python
-    pythonPackages.dbus
+    pythonPackages.dbus-python
     pythonPackages.pygobject
     pythonPackages.pygtk
     pythonPackages.notify
diff --git a/pkgs/tools/networking/wicd/default.nix b/pkgs/tools/networking/wicd/default.nix
index fe6ad74c236..40acfaf323a 100644
--- a/pkgs/tools/networking/wicd/default.nix
+++ b/pkgs/tools/networking/wicd/default.nix
@@ -4,7 +4,7 @@
 , locale ? "C" }:
 
 let
-  inherit (pythonPackages) python pygobject dbus pyGtkGlade pycairo;
+  inherit (pythonPackages) python pygobject dbus-python pyGtkGlade pycairo;
 in stdenv.mkDerivation rec {
   name = "wicd-${version}";
   version = "1.7.2.4";
@@ -38,15 +38,15 @@ in stdenv.mkDerivation rec {
     substituteInPlace in/scripts=wicd.in --subst-var-by TEMPLATE-DEFAULT $out/share/other/dhclient.conf.template.default
 
     sed -i "2iexport PATH=${python}/bin:${wpa_supplicant}/sbin:${dhcpcd}/sbin:${dhcp}/sbin:${wirelesstools}/sbin:${nettools}/sbin:${nettools}/bin:${iputils}/bin:${openresolv}/sbin:${iproute}/sbin\$\{PATH:+:\}\$PATH" in/scripts=wicd.in
-    sed -i "3iexport PYTHONPATH=$(toPythonPath $out):$(toPythonPath ${pygobject}):$(toPythonPath ${dbus})\$\{PYTHONPATH:+:\}\$PYTHONPATH" in/scripts=wicd.in
+    sed -i "3iexport PYTHONPATH=$(toPythonPath $out):$(toPythonPath ${pygobject}):$(toPythonPath ${dbus-python})\$\{PYTHONPATH:+:\}\$PYTHONPATH" in/scripts=wicd.in
     sed -i "2iexport PATH=${python}/bin\$\{PATH:+:\}\$PATH" in/scripts=wicd-client.in
-    sed -i "3iexport PYTHONPATH=$(toPythonPath $out):$(toPythonPath ${pyGtkGlade})/gtk-2.0:$(toPythonPath ${pygobject}):$(toPythonPath ${pygobject})/gtk-2.0:$(toPythonPath ${pycairo}):$(toPythonPath ${dbus})\$\{PYTHONPATH:+:\}\$PYTHONPATH" in/scripts=wicd-client.in
+    sed -i "3iexport PYTHONPATH=$(toPythonPath $out):$(toPythonPath ${pyGtkGlade})/gtk-2.0:$(toPythonPath ${pygobject}):$(toPythonPath ${pygobject})/gtk-2.0:$(toPythonPath ${pycairo}):$(toPythonPath ${dbus-python})\$\{PYTHONPATH:+:\}\$PYTHONPATH" in/scripts=wicd-client.in
     sed -i "2iexport PATH=${python}/bin\$\{PATH:+:\}\$PATH" in/scripts=wicd-gtk.in
-    sed -i "3iexport PYTHONPATH=$(toPythonPath $out):$(toPythonPath ${pyGtkGlade})/gtk-2.0:$(toPythonPath ${pygobject}):$(toPythonPath ${pygobject})/gtk-2.0:$(toPythonPath ${pycairo}):$(toPythonPath ${dbus}):$(toPythonPath ${pythonPackages.notify})\$\{PYTHONPATH:+:\}\$PYTHONPATH" in/scripts=wicd-gtk.in
+    sed -i "3iexport PYTHONPATH=$(toPythonPath $out):$(toPythonPath ${pyGtkGlade})/gtk-2.0:$(toPythonPath ${pygobject}):$(toPythonPath ${pygobject})/gtk-2.0:$(toPythonPath ${pycairo}):$(toPythonPath ${dbus-python}):$(toPythonPath ${pythonPackages.notify})\$\{PYTHONPATH:+:\}\$PYTHONPATH" in/scripts=wicd-gtk.in
     sed -i "2iexport PATH=${python}/bin\$\{PATH:+:\}\$PATH" in/scripts=wicd-cli.in
-    sed -i "3iexport PYTHONPATH=$(toPythonPath $out):$(toPythonPath ${pyGtkGlade})/gtk-2.0:$(toPythonPath ${pygobject}):$(toPythonPath ${pycairo}):$(toPythonPath ${dbus})\$\{PYTHONPATH:+:\}\$PYTHONPATH" in/scripts=wicd-cli.in
+    sed -i "3iexport PYTHONPATH=$(toPythonPath $out):$(toPythonPath ${pyGtkGlade})/gtk-2.0:$(toPythonPath ${pygobject}):$(toPythonPath ${pycairo}):$(toPythonPath ${dbus-python})\$\{PYTHONPATH:+:\}\$PYTHONPATH" in/scripts=wicd-cli.in
     sed -i "2iexport PATH=${python}/bin\$\{PATH:+:\}\$PATH" in/scripts=wicd-curses.in
-    sed -i "3iexport PYTHONPATH=$(toPythonPath $out):$(toPythonPath ${pyGtkGlade})/gtk-2.0:$(toPythonPath ${pygobject}):$(toPythonPath ${pycairo}):$(toPythonPath ${dbus}):$(toPythonPath ${pythonPackages.urwid}):$(toPythonPath ${pythonPackages.curses})\$\{PYTHONPATH:+:\}\$PYTHONPATH" in/scripts=wicd-curses.in
+    sed -i "3iexport PYTHONPATH=$(toPythonPath $out):$(toPythonPath ${pyGtkGlade})/gtk-2.0:$(toPythonPath ${pygobject}):$(toPythonPath ${pycairo}):$(toPythonPath ${dbus-python}):$(toPythonPath ${pythonPackages.urwid}):$(toPythonPath ${pythonPackages.curses})\$\{PYTHONPATH:+:\}\$PYTHONPATH" in/scripts=wicd-curses.in
     rm po/ast.po
   '';
 
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 184ae430197..c9b014a2d6d 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -843,14 +843,7 @@ in
 
   mpdcron = callPackage ../tools/audio/mpdcron { };
 
-  mpdris2 = callPackage ../tools/audio/mpdris2 {
-    python = pythonFull;
-    wrapPython = pythonPackages.wrapPython;
-    mpd = pythonPackages.mpd;
-    pygtk = pythonPackages.pygtk;
-    dbus = pythonPackages.dbus;
-    pynotify = pythonPackages.notify;
-  };
+  mpdris2 = callPackage ../tools/audio/mpdris2 { };
 
   playerctl = callPackage ../tools/audio/playerctl { };
 
@@ -3204,8 +3197,6 @@ in
 
   pystringtemplate = callPackage ../development/python-modules/stringtemplate { };
 
-  pythonDBus = self.dbus_python;
-
   pythonIRClib = pythonPackages.pythonIRClib;
 
   pythonSexy = callPackage ../development/python-modules/libsexy { };
@@ -3530,9 +3521,7 @@ in
 
   sonarr = callPackage ../servers/sonarr { };
 
-  sonata = callPackage ../applications/audio/sonata {
-    inherit (python3Packages) buildPythonApplication python isPy3k dbus pygobject3 mpd2;
-  };
+  sonata = callPackage ../applications/audio/sonata { };
 
   sparsehash = callPackage ../development/libraries/sparsehash { };
 
@@ -7104,7 +7093,6 @@ in
   dbus_cplusplus  = callPackage ../development/libraries/dbus-cplusplus { };
   dbus_glib       = callPackage ../development/libraries/dbus-glib { };
   dbus_java       = callPackage ../development/libraries/java/dbus-java { };
-  dbus_python     = self.pythonPackages.dbus;
 
   dbus-sharp-1_0 = callPackage ../development/libraries/dbus-sharp/dbus-sharp-1.0.nix { };
   dbus-sharp-2_0 = callPackage ../development/libraries/dbus-sharp { };
@@ -10767,10 +10755,6 @@ in
 
   blktrace = callPackage ../os-specific/linux/blktrace { };
 
-  bluez4 = lowPrio (callPackage ../os-specific/linux/bluez {
-    pygobject = pygobject3;
-  });
-
   bluez5 = callPackage ../os-specific/linux/bluez/bluez5.nix { };
 
   # Needed for LibreOffice
@@ -10920,7 +10904,7 @@ in
   fatrace = callPackage ../os-specific/linux/fatrace { };
 
   ffadoFull = callPackage ../os-specific/linux/ffado {
-    inherit (pythonPackages) python pyqt4;
+    inherit (pythonPackages) python pyqt4 dbus-python;
   };
   libffado = self.ffadoFull.override { prefix = "lib"; };
 
@@ -13426,7 +13410,6 @@ in
   hakuneko = callPackage ../tools/misc/hakuneko { };
 
   hamster-time-tracker = callPackage ../applications/misc/hamster-time-tracker {
-    inherit (pythonPackages) pyxdg pygtk dbus sqlite3;
     inherit (gnome) gnome_python;
   };
 
@@ -14462,12 +14445,9 @@ in
 
   quirc = callPackage ../tools/graphics/quirc {};
 
-  quodlibet = callPackage ../applications/audio/quodlibet {
-    inherit (pythonPackages) mutagen;
-  };
+  quodlibet = callPackage ../applications/audio/quodlibet { };
 
   quodlibet-with-gst-plugins = callPackage ../applications/audio/quodlibet {
-    inherit (pythonPackages) mutagen;
     withGstPlugins = true;
     gst_plugins_bad = null;
   };
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index b064618520a..5583eab170a 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -191,7 +191,7 @@ in modules // {
     };
   };
 
-  dbus = callPackage ../development/python-modules/dbus {
+  dbus-python = callPackage ../development/python-modules/dbus {
     dbus = pkgs.dbus;
   };
 
@@ -265,14 +265,11 @@ in modules // {
   };
 
   pyqt4 = callPackage ../development/python-modules/pyqt/4.x.nix {
-    pythonDBus = self.dbus;
     pythonPackages = self;
   };
 
   pyqt5 = pkgs.qt55.callPackage ../development/python-modules/pyqt/5.x.nix {
-    sip = self.sip_4_16;
-    pythonDBus = self.dbus;
-    python = self.python;
+    pythonPackages = self;
   };
 
   pyside = callPackage ../development/python-modules/pyside { };
@@ -14612,7 +14609,7 @@ in modules // {
       sha256 = "0yjxwisxpxy3vpnqk9nw5k3db3xx6wyf6sk1px9m94s30glcq2cc";
     };
 
-    propagatedBuildInputs = with self; [ appdirs pyyaml requests2 dbus emoji sleekxmpp mock ];
+    propagatedBuildInputs = with self; [ appdirs pyyaml requests2 dbus-python emoji sleekxmpp mock ];
 
     meta = {
       description = "A utility for sending notifications, on demand and when commands finish";
@@ -22457,7 +22454,7 @@ in modules // {
     # error: invalid command 'test'
     doCheck = false;
 
-    propagatedBuildInputs = with self; [ pkgs.xorg.libX11 pkgs.pythonDBus pygobject ];
+    propagatedBuildInputs = with self; [ pkgs.xorg.libX11 dbus-python pygobject ];
 
     meta = {
       description = "High-level, platform independent Skype API wrapper for Python";
@@ -26724,7 +26721,7 @@ in modules // {
     };
 
     preConfigure = ''
-      export NIX_CFLAGS_COMPILE="$(pkg-config --cflags efl) -I${self.dbus}/include/dbus-1.0 $NIX_CFLAGS_COMPILE"
+      export NIX_CFLAGS_COMPILE="$(pkg-config --cflags efl) -I${self.dbus-python}/include/dbus-1.0 $NIX_CFLAGS_COMPILE"
     '';
     preBuild = "${python}/bin/${python.executable} setup.py build_ext";
     installPhase= "${python}/bin/${python.executable} setup.py install --prefix=$out";
@@ -26794,7 +26791,7 @@ in modules // {
     # no tests available
     doCheck = false;
 
-    propagatedBuildInputs = with self; [ pygobject3 dbus ];
+    propagatedBuildInputs = with self; [ pygobject3 dbus-python ];
 
     meta = {
       homepage = https://github.com/ricardomv/snapper-gui;