From 783c40eb68bbbcb9cf6918255157ecab55eedb6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Tue, 13 Oct 2015 14:33:08 +0200 Subject: [PATCH] dbus: split into multiple outputs and fix referrers --- .../services/x11/display-managers/default.nix | 2 +- pkgs/applications/misc/roxterm/default.nix | 4 +- .../telepathy/kde/default.nix | 4 +- .../telepathy/logger/default.nix | 2 +- .../virtualization/virtualbox/default.nix | 2 +- .../virtualbox/guest-additions/default.nix | 2 +- .../window-managers/weston/default.nix | 2 +- pkgs/desktops/e19/efl.nix | 2 +- .../gnome-2/desktop/gnome-keyring/default.nix | 2 +- .../gnome-3/3.16/core/empathy/default.nix | 4 +- .../3.16/core/gdm/3.16-wip/default.nix | 2 +- .../core/gnome-online-accounts/default.nix | 2 +- .../gnome-3/3.16/misc/gpaste/default.nix | 2 +- .../gnome-3/3.18/core/empathy/default.nix | 4 +- .../3.18/core/gdm/3.16-wip/default.nix | 2 +- .../core/gnome-online-accounts/default.nix | 2 +- .../gnome-3/3.18/misc/gpaste/default.nix | 2 +- pkgs/desktops/plasma-5.3/default.nix | 2 +- .../0001-startkde-NixOS-patches.patch | 2 +- .../0001-startkde-NixOS-patches.patch | 2 +- .../plasma-5.4/plasma-workspace/default.nix | 5 +- .../libraries/dbus-glib/default.nix | 2 +- pkgs/development/libraries/dbus/default.nix | 126 +++++++----------- .../libraries/dbus/no-create-dirs.patch | 26 ---- .../libraries/dbus/ucred-dirty-hack.patch | 18 --- pkgs/development/libraries/gvfs/default.nix | 2 +- .../libraries/policykit/default.nix | 2 +- .../libraries/qt-4.x/4.8/default.nix | 2 +- .../development/libraries/qt-5/5.4/qtbase.nix | 4 +- .../libraries/qt-5/5.5/qtbase/default.nix | 4 +- .../tools/misc/eggdbus/default.nix | 2 +- pkgs/misc/cups/default.nix | 2 +- pkgs/os-specific/linux/bluez/bluez5.nix | 2 +- pkgs/os-specific/linux/bluez/bluez5_28.nix | 2 +- pkgs/os-specific/linux/bluez/default.nix | 2 +- pkgs/os-specific/linux/systemd/default.nix | 2 +- pkgs/servers/pulseaudio/default.nix | 2 +- pkgs/servers/x11/xorg/overrides.nix | 2 +- .../bluetooth/obex-data-server/default.nix | 2 +- pkgs/tools/bluetooth/obexd/default.nix | 2 +- pkgs/tools/system/thermald/default.nix | 2 +- pkgs/top-level/all-packages.nix | 4 +- 42 files changed, 95 insertions(+), 170 deletions(-) delete mode 100644 pkgs/development/libraries/dbus/no-create-dirs.patch delete mode 100644 pkgs/development/libraries/dbus/ucred-dirty-hack.patch diff --git a/nixos/modules/services/x11/display-managers/default.nix b/nixos/modules/services/x11/display-managers/default.nix index 997ab030af92..c59777f525d1 100644 --- a/nixos/modules/services/x11/display-managers/default.nix +++ b/nixos/modules/services/x11/display-managers/default.nix @@ -52,7 +52,7 @@ let ${optionalString cfg.startDbusSession '' if test -z "$DBUS_SESSION_BUS_ADDRESS"; then - exec ${pkgs.dbus.tools}/bin/dbus-launch --exit-with-session "$0" "$sessionType" + exec ${pkgs.dbus.dbus-launch} --exit-with-session "$0" "$sessionType" fi ''} diff --git a/pkgs/applications/misc/roxterm/default.nix b/pkgs/applications/misc/roxterm/default.nix index 947d790c3bba..c6145c9a294d 100644 --- a/pkgs/applications/misc/roxterm/default.nix +++ b/pkgs/applications/misc/roxterm/default.nix @@ -25,8 +25,8 @@ in stdenv.mkDerivation rec { [ dbus_libs dbus_glib gdk_pixbuf gettext gsettings_desktop_schemas gtk2 gtk3 hicolor_icon_theme vte ]; NIX_CFLAGS_COMPILE = [ "-I${dbus_glib.dev}/include/dbus-1.0" - "-I${dbus_libs}/include/dbus-1.0" - "-I${dbus_libs}/lib/dbus-1.0/include" ]; + "-I${dbus_libs.dev}/include/dbus-1.0" + "-I${dbus_libs.lib}/lib/dbus-1.0/include" ]; # Fix up python path so the lockfile library is on it. PYTHONPATH = stdenv.lib.makeSearchPath "lib/${pythonFull.libPrefix}/site-packages" [ diff --git a/pkgs/applications/networking/instant-messengers/telepathy/kde/default.nix b/pkgs/applications/networking/instant-messengers/telepathy/kde/default.nix index 2bcb4d631b34..84ced8f62c6e 100644 --- a/pkgs/applications/networking/instant-messengers/telepathy/kde/default.nix +++ b/pkgs/applications/networking/instant-messengers/telepathy/kde/default.nix @@ -12,10 +12,10 @@ let NIX_CFLAGS_COMPILE = "-I${telepathy_glib}/include/telepathy-1.0" + " -I${dbus_glib.dev}/include/dbus-1.0" - + " -I${dbus_libs}/include/dbus-1.0"; + + " -I${dbus_libs.dev}/include/dbus-1.0"; }; telepathy_logger_qt = x : x // { - NIX_CFLAGS_COMPILE = "-I${dbus_libs}/include/dbus-1.0"; + NIX_CFLAGS_COMPILE = "-I${dbus_libs.dev}/include/dbus-1.0"; }; }; diff --git a/pkgs/applications/networking/instant-messengers/telepathy/logger/default.nix b/pkgs/applications/networking/instant-messengers/telepathy/logger/default.nix index 8341bef946e3..aaff39ccb44d 100644 --- a/pkgs/applications/networking/instant-messengers/telepathy/logger/default.nix +++ b/pkgs/applications/networking/instant-messengers/telepathy/logger/default.nix @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { sha256 = "18i00l8lnp5dghqmgmpxnn0is2a20pkisxy0sb78hnd2dz0z6xnl"; }; - NIX_CFLAGS_COMPILE = "-I${dbus_glib.dev}/include/dbus-1.0 -I${dbus_libs}/include/dbus-1.0"; + NIX_CFLAGS_COMPILE = "-I${dbus_glib.dev}/include/dbus-1.0 -I${dbus_libs.dev}/include/dbus-1.0"; buildInputs = [ dbus_glib libxml2 sqlite telepathy_glib pkgconfig intltool gobjectIntrospection dbus_libs ]; diff --git a/pkgs/applications/virtualization/virtualbox/default.nix b/pkgs/applications/virtualization/virtualbox/default.nix index efb1ceeb0982..17ef89b36e66 100644 --- a/pkgs/applications/virtualization/virtualbox/default.nix +++ b/pkgs/applications/virtualization/virtualbox/default.nix @@ -85,7 +85,7 @@ in stdenv.mkDerivation { ls kBuild/bin/linux.amd64/k* tools/linux.amd64/bin/* | xargs -n 1 patchelf --set-interpreter ${stdenv.glibc.out}/lib/ld-linux-x86-64.so.2 find . -type f -iname '*makefile*' -exec sed -i -e 's/depmod -a/:/g' {} + sed -i -e ' - s@"libdbus-1\.so\.3"@"${dbus.out}/lib/libdbus-1.so.3"@g + s@"libdbus-1\.so\.3"@"${dbus.lib}/lib/libdbus-1.so.3"@g s@"libasound\.so\.2"@"${alsaLib.out}/lib/libasound.so.2"@g ${optionalString pulseSupport '' s@"libpulse\.so\.0"@"${libpulseaudio.out}/lib/libpulse.so.0"@g diff --git a/pkgs/applications/virtualization/virtualbox/guest-additions/default.nix b/pkgs/applications/virtualization/virtualbox/guest-additions/default.nix index 15b675c9a5d5..dcc6646f48ec 100644 --- a/pkgs/applications/virtualization/virtualbox/guest-additions/default.nix +++ b/pkgs/applications/virtualization/virtualbox/guest-additions/default.nix @@ -75,7 +75,7 @@ stdenv.mkDerivation { for i in lib/VBoxOGL*.so do - patchelf --set-rpath $out/lib:${dbus}/lib $i + patchelf --set-rpath $out/lib:${dbus.lib}/lib $i done # FIXME: Virtualbox 4.3.22 moved VBoxClient-all (required by Guest Additions diff --git a/pkgs/applications/window-managers/weston/default.nix b/pkgs/applications/window-managers/weston/default.nix index 862e8b0ea01e..0720368222dc 100644 --- a/pkgs/applications/window-managers/weston/default.nix +++ b/pkgs/applications/window-managers/weston/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkgconfig ]; buildInputs = [ wayland mesa libxkbcommon cairo libxcb libXcursor xlibsWrapper udev libdrm - mtdev libjpeg pam dbus.libs libinput pango libunwind freerdp vaapi libva + mtdev libjpeg pam dbus libinput pango libunwind freerdp vaapi libva libwebp ]; diff --git a/pkgs/desktops/e19/efl.nix b/pkgs/desktops/e19/efl.nix index 16c934b3b3af..3afb76dccf10 100644 --- a/pkgs/desktops/e19/efl.nix +++ b/pkgs/desktops/e19/efl.nix @@ -28,7 +28,7 @@ stdenv.mkDerivation rec { "--disable-tslib" "--with-systemdunitdir=$out/systemd/user" "ac_ct_CXX=foo" ]; - NIX_CFLAGS_COMPILE = [ "-I${xorg.libXtst}" "-I${dbus_libs}/include/dbus-1.0" "-I${dbus_libs}/lib/dbus-1.0/include" ]; + NIX_CFLAGS_COMPILE = [ "-I${xorg.libXtst}" "-I${dbus_libs.dev}/include/dbus-1.0" "-I${dbus_libs.lib}/lib/dbus-1.0/include" ]; patches = [ ./efl-elua.patch ]; diff --git a/pkgs/desktops/gnome-2/desktop/gnome-keyring/default.nix b/pkgs/desktops/gnome-2/desktop/gnome-keyring/default.nix index f31875bed91c..50f2cd081332 100644 --- a/pkgs/desktops/gnome-2/desktop/gnome-keyring/default.nix +++ b/pkgs/desktops/gnome-2/desktop/gnome-keyring/default.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation { sha256 = "02r9gv3a4a705jf3h7c0bizn33c73wz0iw2500m7z291nrnmqkmj"; }; - buildInputs = [ dbus.libs libgcrypt pam python gtk GConf libgnome_keyring ]; + buildInputs = [ dbus libgcrypt pam python gtk GConf libgnome_keyring ]; propagatedBuildInputs = [ glib libtasn1 ]; diff --git a/pkgs/desktops/gnome-3/3.16/core/empathy/default.nix b/pkgs/desktops/gnome-3/3.16/core/empathy/default.nix index 83f33fbc3c56..48b45f28522e 100644 --- a/pkgs/desktops/gnome-3/3.16/core/empathy/default.nix +++ b/pkgs/desktops/gnome-3/3.16/core/empathy/default.nix @@ -36,8 +36,8 @@ stdenv.mkDerivation rec { file libtool librsvg ]; NIX_CFLAGS_COMPILE = [ "-I${dbus_glib.dev}/include/dbus-1.0" - "-I${dbus_libs}/include/dbus-1.0" - "-I${dbus_libs}/lib/dbus-1.0/include" ]; + "-I${dbus_libs.dev}/include/dbus-1.0" + "-I${dbus_libs.lib}/lib/dbus-1.0/include" ]; preFixup = '' for f in $out/bin/* $out/libexec/*; do diff --git a/pkgs/desktops/gnome-3/3.16/core/gdm/3.16-wip/default.nix b/pkgs/desktops/gnome-3/3.16/core/gdm/3.16-wip/default.nix index 51b67afb01fd..b0e9652a9c51 100644 --- a/pkgs/desktops/gnome-3/3.16/core/gdm/3.16-wip/default.nix +++ b/pkgs/desktops/gnome-3/3.16/core/gdm/3.16-wip/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { preConfigure = '' substituteInPlace ./configure --replace "/usr/bin/X" "${xorg.xorgserver}/bin/X" substituteInPlace daemon/gdm-simple-slave.c --replace 'BINDIR "/gnome-session' '"${gnome_session}/bin/gnome-session' - substituteInPlace daemon/gdm-launch-environment.c --replace 'BINDIR "/dbus-launch' '"${dbus.tools}/bin/dbus-launch' + substituteInPlace daemon/gdm-launch-environment.c --replace 'BINDIR "/dbus-launch' '"${dbus.dbus-launch}' substituteInPlace data/gdm.conf-custom.in --replace '#WaylandEnable=false' 'WaylandEnable=false' sed 's/#Enable=true/Enable=true/' -i data/gdm.conf-custom.in ''; diff --git a/pkgs/desktops/gnome-3/3.16/core/gnome-online-accounts/default.nix b/pkgs/desktops/gnome-3/3.16/core/gnome-online-accounts/default.nix index 6cedbca61d70..8bb21feb54ab 100644 --- a/pkgs/desktops/gnome-3/3.16/core/gnome-online-accounts/default.nix +++ b/pkgs/desktops/gnome-3/3.16/core/gnome-online-accounts/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { sha256 = "1mpzj6fc42hhx77lki8cdycgfj9gjrm611rh0wsaqam4qq2c9a9c"; }; - NIX_CFLAGS_COMPILE = "-I${dbus_glib.dev}/include/dbus-1.0 -I${dbus_libs}/include/dbus-1.0"; + NIX_CFLAGS_COMPILE = "-I${dbus_glib.dev}/include/dbus-1.0 -I${dbus_libs.dev}/include/dbus-1.0"; enableParallelBuilding = true; diff --git a/pkgs/desktops/gnome-3/3.16/misc/gpaste/default.nix b/pkgs/desktops/gnome-3/3.16/misc/gpaste/default.nix index 6563f7979700..0d6551216cf8 100644 --- a/pkgs/desktops/gnome-3/3.16/misc/gpaste/default.nix +++ b/pkgs/desktops/gnome-3/3.16/misc/gpaste/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { }; buildInputs = [ intltool autoreconfHook pkgconfig vala glib - gtk3 gnome3.gnome_control_center dbus.libs + gtk3 gnome3.gnome_control_center dbus clutter pango appstream-glib makeWrapper ]; preConfigure = "intltoolize -f"; diff --git a/pkgs/desktops/gnome-3/3.18/core/empathy/default.nix b/pkgs/desktops/gnome-3/3.18/core/empathy/default.nix index 83f33fbc3c56..48b45f28522e 100644 --- a/pkgs/desktops/gnome-3/3.18/core/empathy/default.nix +++ b/pkgs/desktops/gnome-3/3.18/core/empathy/default.nix @@ -36,8 +36,8 @@ stdenv.mkDerivation rec { file libtool librsvg ]; NIX_CFLAGS_COMPILE = [ "-I${dbus_glib.dev}/include/dbus-1.0" - "-I${dbus_libs}/include/dbus-1.0" - "-I${dbus_libs}/lib/dbus-1.0/include" ]; + "-I${dbus_libs.dev}/include/dbus-1.0" + "-I${dbus_libs.lib}/lib/dbus-1.0/include" ]; preFixup = '' for f in $out/bin/* $out/libexec/*; do diff --git a/pkgs/desktops/gnome-3/3.18/core/gdm/3.16-wip/default.nix b/pkgs/desktops/gnome-3/3.18/core/gdm/3.16-wip/default.nix index 51b67afb01fd..b0e9652a9c51 100644 --- a/pkgs/desktops/gnome-3/3.18/core/gdm/3.16-wip/default.nix +++ b/pkgs/desktops/gnome-3/3.18/core/gdm/3.16-wip/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { preConfigure = '' substituteInPlace ./configure --replace "/usr/bin/X" "${xorg.xorgserver}/bin/X" substituteInPlace daemon/gdm-simple-slave.c --replace 'BINDIR "/gnome-session' '"${gnome_session}/bin/gnome-session' - substituteInPlace daemon/gdm-launch-environment.c --replace 'BINDIR "/dbus-launch' '"${dbus.tools}/bin/dbus-launch' + substituteInPlace daemon/gdm-launch-environment.c --replace 'BINDIR "/dbus-launch' '"${dbus.dbus-launch}' substituteInPlace data/gdm.conf-custom.in --replace '#WaylandEnable=false' 'WaylandEnable=false' sed 's/#Enable=true/Enable=true/' -i data/gdm.conf-custom.in ''; diff --git a/pkgs/desktops/gnome-3/3.18/core/gnome-online-accounts/default.nix b/pkgs/desktops/gnome-3/3.18/core/gnome-online-accounts/default.nix index b08aa1c99907..c6688fd30cd7 100644 --- a/pkgs/desktops/gnome-3/3.18/core/gnome-online-accounts/default.nix +++ b/pkgs/desktops/gnome-3/3.18/core/gnome-online-accounts/default.nix @@ -7,7 +7,7 @@ stdenv.mkDerivation rec { inherit (import ./src.nix fetchurl) name src; - NIX_CFLAGS_COMPILE = "-I${dbus_glib.dev}/include/dbus-1.0 -I${dbus_libs}/include/dbus-1.0"; + NIX_CFLAGS_COMPILE = "-I${dbus_glib.dev}/include/dbus-1.0 -I${dbus_libs.dev}/include/dbus-1.0"; enableParallelBuilding = true; diff --git a/pkgs/desktops/gnome-3/3.18/misc/gpaste/default.nix b/pkgs/desktops/gnome-3/3.18/misc/gpaste/default.nix index dee9caf444c5..6c36f892bcc9 100644 --- a/pkgs/desktops/gnome-3/3.18/misc/gpaste/default.nix +++ b/pkgs/desktops/gnome-3/3.18/misc/gpaste/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { }; buildInputs = [ intltool autoreconfHook pkgconfig vala glib - gtk3 gnome3.gnome_control_center dbus.libs + gtk3 gnome3.gnome_control_center dbus clutter pango appstream-glib makeWrapper ]; preConfigure = "intltoolize -f"; diff --git a/pkgs/desktops/plasma-5.3/default.nix b/pkgs/desktops/plasma-5.3/default.nix index 35c32829921b..dec9fca04a5b 100644 --- a/pkgs/desktops/plasma-5.3/default.nix +++ b/pkgs/desktops/plasma-5.3/default.nix @@ -236,7 +236,7 @@ let inherit (scope) bash coreutils gnused gnugrep socat; inherit (scope) kconfig kinit kservice qt5tools; inherit (scope.xorg) mkfontdir xmessage xprop xrdb xset xsetroot; - dbus_tools = scope.dbus.tools; + inherit (scope.dbus) dbus-launch; kde_workspace = kdeApps.kde-workspace; postPatch = '' substituteInPlace startkde/kstartupconfig/kstartupconfig.cpp \ diff --git a/pkgs/desktops/plasma-5.3/plasma-workspace/0001-startkde-NixOS-patches.patch b/pkgs/desktops/plasma-5.3/plasma-workspace/0001-startkde-NixOS-patches.patch index bef2867f3434..5ab5d4585c06 100644 --- a/pkgs/desktops/plasma-5.3/plasma-workspace/0001-startkde-NixOS-patches.patch +++ b/pkgs/desktops/plasma-5.3/plasma-workspace/0001-startkde-NixOS-patches.patch @@ -180,7 +180,7 @@ index 6f93108..26cc2fc 100644 +# Make sure that D-Bus is running +# D-Bus autolaunch is broken +if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then -+ eval `@dbus_tools@/bin/dbus-launch --sh-syntax --exit-with-session` ++ eval `@dbus-launch@ --sh-syntax --exit-with-session` +fi +if @qt5tools@/bin/qdbus >/dev/null 2>/dev/null; then + : # ok diff --git a/pkgs/desktops/plasma-5.4/plasma-workspace/0001-startkde-NixOS-patches.patch b/pkgs/desktops/plasma-5.4/plasma-workspace/0001-startkde-NixOS-patches.patch index 6752258112ef..4c47e344e9fe 100644 --- a/pkgs/desktops/plasma-5.4/plasma-workspace/0001-startkde-NixOS-patches.patch +++ b/pkgs/desktops/plasma-5.4/plasma-workspace/0001-startkde-NixOS-patches.patch @@ -180,7 +180,7 @@ index cfbe227..999dd8f 100644 +# Make sure that D-Bus is running +# D-Bus autolaunch is broken +if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then -+ eval `@dbus_tools@/bin/dbus-launch --sh-syntax --exit-with-session` ++ eval `@dbus-launch@ --sh-syntax --exit-with-session` +fi +if @qttools@/bin/qdbus >/dev/null 2>/dev/null; then + : # ok diff --git a/pkgs/desktops/plasma-5.4/plasma-workspace/default.nix b/pkgs/desktops/plasma-5.4/plasma-workspace/default.nix index f9339f808062..d6537b82dd6e 100644 --- a/pkgs/desktops/plasma-5.4/plasma-workspace/default.nix +++ b/pkgs/desktops/plasma-5.4/plasma-workspace/default.nix @@ -44,7 +44,7 @@ , kinit , kservice , qttools -, dbus_tools +, dbus , mkfontdir , xmessage , xprop @@ -101,7 +101,8 @@ plasmaPackage { inherit bash coreutils gnused gnugrep socat; inherit kconfig kinit kservice qttools; - inherit dbus_tools mkfontdir xmessage xprop xrdb xset xsetroot; + inherit mkfontdir xmessage xprop xrdb xset xsetroot; + inherit (dbus) dbus-launch; postPatch = '' substituteAllInPlace startkde/startkde.cmake substituteInPlace startkde/kstartupconfig/kstartupconfig.cpp \ diff --git a/pkgs/development/libraries/dbus-glib/default.nix b/pkgs/development/libraries/dbus-glib/default.nix index 28df5593695c..1d91faa68175 100644 --- a/pkgs/development/libraries/dbus-glib/default.nix +++ b/pkgs/development/libraries/dbus-glib/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { buildInputs = [ expat libiconv ]; - propagatedBuildInputs = [ dbus.libs glib ]; + propagatedBuildInputs = [ dbus glib ]; doCheck = true; diff --git a/pkgs/development/libraries/dbus/default.nix b/pkgs/development/libraries/dbus/default.nix index 4a0f98d262a0..b569fc187e28 100644 --- a/pkgs/development/libraries/dbus/default.nix +++ b/pkgs/development/libraries/dbus/default.nix @@ -1,5 +1,4 @@ -{ stdenv, fetchurl, pkgconfig, autoconf, automake, libtool -, expat, systemd, glib, dbus_glib, python +{ stdenv, lib, fetchurl, pkgconfig, expat, systemd, glib, dbus_glib, python , libX11 ? null, libICE ? null, libSM ? null, x11Support ? (stdenv.isLinux || stdenv.isDarwin) }: assert x11Support -> libX11 != null @@ -10,107 +9,76 @@ let version = "1.8.20"; sha256 = "0fkh3d5r57a659hw9lqnw4v0bc5556vx54fsf7l9c732ci6byksw"; - inherit (stdenv) lib; - - buildInputsX = lib.optionals x11Support [ libX11 libICE libSM ]; - - # also other parts than "libs" need this statically linked lib - makeInternalLib = "(cd dbus && make libdbus-internal.la)"; - - systemdOrEmpty = lib.optional stdenv.isLinux systemd; - - # A generic builder for individual parts (subdirs) of D-Bus - dbus_drv = name: subdirs: merge: stdenv.mkDerivation (lib.mergeAttrsByFuncDefaultsClean [{ - - name = "dbus-${name}-${version}"; +self = stdenv.mkDerivation { + name = "dbus-${version}"; src = fetchurl { url = "http://dbus.freedesktop.org/releases/dbus/dbus-${version}.tar.gz"; inherit sha256; }; - patches = [ - ./ignore-missing-includedirs.patch - ./ucred-dirty-hack.patch - ./no-create-dirs.patch - ] - ++ lib.optional (stdenv.isSunOS || stdenv.isLinux) ./implement-getgrouplist.patch - ; + patches = [ ./ignore-missing-includedirs.patch ] + ++ lib.optional stdenv.isSunOS ./implement-getgrouplist.patch; + postPatch = '' + substituteInPlace tools/Makefile.in \ + --replace 'install-localstatelibDATA:' 'disabled:' \ + --replace 'install-data-local:' 'disabled:' \ + --replace 'installcheck-local:' 'disabled:' + substituteInPlace bus/Makefile.in \ + --replace '$(mkinstalldirs) $(DESTDIR)$(localstatedir)/run/dbus' ':' + '' + /* cleanup of runtime references */ '' + substituteInPlace ./dbus/dbus-sysdeps-unix.c \ + --replace 'DBUS_BINDIR "/dbus-launch"' "\"$lib/bin/dbus-launch\"" + substituteInPlace ./tools/dbus-launch.c \ + --replace 'DBUS_DAEMONDIR"/dbus-daemon"' '"/run/current-system/sw/bin/dbus-daemon"' + ''; - # build only the specified subdirs - postPatch = "sed '/SUBDIRS/s/=.*/=" + subdirs + "/' -i Makefile.am\n" - # use already packaged libdbus instead of trying to build it again - + lib.optionalString (name != "libs") '' - for mfile in */Makefile.am; do - sed 's,\$(top_builddir)/dbus/\(libdbus-[0-9]\),${libs}/lib/\1,g' -i "$mfile" - done - ''; + outputs = [ "dev" "out" "lib" "doc" ]; nativeBuildInputs = [ pkgconfig ]; propagatedBuildInputs = [ expat ]; - buildInputs = [ autoconf automake libtool ]; # ToDo: optional selinux? - - preConfigure = '' - patchShebangs . - substituteInPlace tools/Makefile.am --replace 'install-localstatelibDATA:' 'disabled:' - autoreconf -fi - ''; + buildInputs = lib.optional stdenv.isLinux systemd + ++ lib.optionals x11Support [ libX11 libICE libSM ]; + # ToDo: optional selinux? configureFlags = [ "--localstatedir=/var" "--sysconfdir=/etc" "--with-session-socket-dir=/tmp" "--with-systemdsystemunitdir=$(out)/etc/systemd/system" + # this package installs nothing into those dirs and they create a dependency + "--datadir=/run/current-system/sw/share" + "--libexecdir=$(out)/libexec" # we don't need dbus-daemon-launch-helper ] ++ lib.optional (!x11Support) "--without-x"; + # Enable X11 autolaunch support in libdbus. This doesn't actually depend on X11 + # (it just execs dbus-launch in dbus.tools), contrary to what the configure script demands. + NIX_CFLAGS_COMPILE = "-DDBUS_ENABLE_X11_AUTOLAUNCH=1"; + NIX_CFLAGS_LINK = lib.optionalString (!stdenv.isDarwin) "-Wl,--as-needed"; + enableParallelBuilding = true; doCheck = true; - installFlags = "sysconfdir=$(out)/etc"; + installFlags = "sysconfdir=$(out)/etc datadir=$(out)/share"; - } merge ]); - - libs = dbus_drv "libs" "dbus" { - # Enable X11 autolaunch support in libdbus. This doesn't actually depend on X11 - # (it just execs dbus-launch in dbus.tools), contrary to what the configure script demands. - NIX_CFLAGS_COMPILE = "-DDBUS_ENABLE_X11_AUTOLAUNCH=1"; - buildInputs = [ systemdOrEmpty ]; - meta.platforms = stdenv.lib.platforms.all; - }; - - - attrs = rec { - # If you change much fix indentation - - # This package has been split because most applications only need dbus.lib - # which serves as an interface to a *system-wide* daemon, - # see e.g. http://en.wikipedia.org/wiki/D-Bus#Architecture . - - inherit libs; - - tools = dbus_drv "tools" "tools bus" { - preBuild = makeInternalLib; - buildInputs = buildInputsX ++ systemdOrEmpty ++ [ libs ]; - NIX_CFLAGS_LINK = - stdenv.lib.optionalString (!stdenv.isDarwin) "-Wl,--as-needed " - + "-ldbus-1"; - - # don't provide another dbus-1.pc (with incorrect include and link dirs), - # also remove useless empty dirs - postInstall = '' - rm "$out"/lib/pkgconfig/dbus-1.pc - rmdir --parents --ignore-fail-on-non-empty "$out"/{lib/pkgconfig,share/dbus-1/*} + # it's executed from $lib by absolute path + postFixup = '' + _moveToOutput bin/dbus-launch "$lib" + ln -s "$lib/bin/dbus-launch" "$out/bin/" ''; - meta.platforms = with stdenv.lib.platforms; allBut darwin; + passthru = { + dbus-launch = "${self.lib}/bin/dbus-launch"; + daemon = self.out; + }; + + meta = with stdenv.lib; { + description = "Simple interprocess messaging system"; + homepage = http://www.freedesktop.org/wiki/Software/dbus/; + license = licenses.gpl2Plus; # most is also under AFL-2.1 + platforms = platforms.unix; + }; }; - - daemon = tools; - - docs = dbus_drv "docs" "doc" { - postInstall = ''rm -r "$out/lib"''; - }; -}; -in attrs.libs // attrs +in self diff --git a/pkgs/development/libraries/dbus/no-create-dirs.patch b/pkgs/development/libraries/dbus/no-create-dirs.patch deleted file mode 100644 index cf10d9775991..000000000000 --- a/pkgs/development/libraries/dbus/no-create-dirs.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff --git a/bus/Makefile.am b/bus/Makefile.am -index 6cbc09a..be60bb8 100644 ---- a/bus/Makefile.am -+++ b/bus/Makefile.am -@@ -212,7 +212,6 @@ clean-local: - /bin/rm *.bb *.bbg *.da *.gcov || true - - install-data-hook: -- $(mkinstalldirs) $(DESTDIR)$(localstatedir)/run/dbus - $(mkinstalldirs) $(DESTDIR)$(configdir)/system.d - $(mkinstalldirs) $(DESTDIR)$(configdir)/session.d - $(mkinstalldirs) $(DESTDIR)$(datadir)/dbus-1/services -diff --git a/tools/Makefile.am b/tools/Makefile.am -index cfd54b8..b6e28f9 100644 ---- a/tools/Makefile.am -+++ b/tools/Makefile.am -@@ -74,7 +74,7 @@ CLEANFILES = \ - - # create the /var/lib/dbus directory for dbus-uuidgen - install-data-local: -- $(MKDIR_P) $(DESTDIR)$(localstatedir)/lib/dbus -+ : - - installcheck-local: -- test -d $(DESTDIR)$(localstatedir)/lib/dbus -+ : diff --git a/pkgs/development/libraries/dbus/ucred-dirty-hack.patch b/pkgs/development/libraries/dbus/ucred-dirty-hack.patch deleted file mode 100644 index a07abcc15fb0..000000000000 --- a/pkgs/development/libraries/dbus/ucred-dirty-hack.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff --git a/dbus/dbus-sysdeps-unix.c b/dbus/dbus-sysdeps-unix.c -index b4ecc96..267984a 100644 ---- a/dbus/dbus-sysdeps-unix.c -+++ b/dbus/dbus-sysdeps-unix.c -@@ -1635,6 +1635,13 @@ write_credentials_byte (int server_fd, - } - } - -+struct ucred -+{ -+ pid_t pid; /* PID of sending process. */ -+ uid_t uid; /* UID of sending process. */ -+ gid_t gid; /* GID of sending process. */ -+}; -+ - /** - * Reads a single byte which must be nul (an error occurs otherwise), - * and reads unix credentials if available. Clears the credentials diff --git a/pkgs/development/libraries/gvfs/default.nix b/pkgs/development/libraries/gvfs/default.nix index d2a958faed8b..37403f50e2b1 100644 --- a/pkgs/development/libraries/gvfs/default.nix +++ b/pkgs/development/libraries/gvfs/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkgconfig intltool libtool ]; buildInputs = - [ makeWrapper glib dbus.libs udev libgudev udisks2 libgcrypt + [ makeWrapper glib dbus udev libgudev udisks2 libgcrypt libgphoto2 avahi libarchive fuse libcdio libxml2 libxslt docbook_xsl samba libmtp # ToDo: a ligther version of libsoup to have FTP/HTTP support? diff --git a/pkgs/development/libraries/policykit/default.nix b/pkgs/development/libraries/policykit/default.nix index f494710be638..9f8b702f8975 100644 --- a/pkgs/development/libraries/policykit/default.nix +++ b/pkgs/development/libraries/policykit/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { buildInputs = [ pkgconfig glib dbus_glib pam intltool gettext libxslt ]; - propagatedBuildInputs = [ expat dbus.libs ]; + propagatedBuildInputs = [ expat dbus ]; configureFlags = "--localstatedir=/var --sysconfdir=/etc"; diff --git a/pkgs/development/libraries/qt-4.x/4.8/default.nix b/pkgs/development/libraries/qt-4.x/4.8/default.nix index 85ce97344a3a..ccc486692e24 100644 --- a/pkgs/development/libraries/qt-4.x/4.8/default.nix +++ b/pkgs/development/libraries/qt-4.x/4.8/default.nix @@ -117,7 +117,7 @@ stdenv.mkDerivation rec { propagatedBuildInputs = [ libXrender libXrandr libXinerama libXcursor libXext libXfixes libXv libXi - libSM zlib libpng openssl dbus.libs freetype fontconfig glib ] + libSM zlib libpng openssl dbus freetype fontconfig glib ] # Qt doesn't directly need GLU (just GL), but many apps use, it's small and doesn't remain a runtime-dep if not used ++ optional mesaSupported mesa_glu ++ optional ((buildWebkit || buildMultimedia) && stdenv.isLinux ) alsaLib diff --git a/pkgs/development/libraries/qt-5/5.4/qtbase.nix b/pkgs/development/libraries/qt-5/5.4/qtbase.nix index c333298e4583..652814a3fd1d 100644 --- a/pkgs/development/libraries/qt-5/5.4/qtbase.nix +++ b/pkgs/development/libraries/qt-5/5.4/qtbase.nix @@ -71,7 +71,7 @@ stdenv.mkDerivation { ./0006-tzdir.patch (substituteAll { src = ./0010-dlopen-libXcursor.patch; libXcursor = libXcursor.out; }) (substituteAll { src = ./0011-dlopen-openssl.patch; openssl = openssl.out; }) - (substituteAll { src = ./0012-dlopen-dbus.patch; dbus_libs = dbus.libs.out; }) + (substituteAll { src = ./0012-dlopen-dbus.patch; dbus_libs = dbus.lib; }) ./0013-xdg_config_dirs.patch ] ++ optional mesaSupported (substituteAll { src = ./0014-mkspecs-libgl.patch; mesa_inc = mesa.dev; mesa_lib = mesa.out; }) @@ -166,7 +166,7 @@ stdenv.mkDerivation { propagatedBuildInputs = [ xorg.libXcomposite libX11 libxcb libXext libXrender libXi - fontconfig freetype openssl dbus.libs glib udev libxml2 libxslt pcre + fontconfig freetype openssl dbus glib udev libxml2 libxslt pcre zlib libjpeg libpng libtiff sqlite icu xcbutil xcbutilimage xcbutilkeysyms xcbutilwm libxkbcommon ] diff --git a/pkgs/development/libraries/qt-5/5.5/qtbase/default.nix b/pkgs/development/libraries/qt-5/5.5/qtbase/default.nix index 4137a83754ba..1aba5c98d9c1 100644 --- a/pkgs/development/libraries/qt-5/5.5/qtbase/default.nix +++ b/pkgs/development/libraries/qt-5/5.5/qtbase/default.nix @@ -81,7 +81,7 @@ stdenv.mkDerivation { }; dlopen-dbus = substituteAll { src = ./0007-dlopen-dbus.patch; - dbus_libs = dbus.libs.out; + dbus_libs = dbus.lib; }; xdg-config-dirs = ./0008-xdg-config-dirs.patch; decrypt-ssl-traffic = ./0009-decrypt-ssl-traffic.patch; @@ -187,7 +187,7 @@ stdenv.mkDerivation { propagatedBuildInputs = [ xlibs.libXcomposite libX11 libxcb libXext libXrender libXi - fontconfig freetype openssl dbus.libs glib udev libxml2 libxslt pcre + fontconfig freetype openssl dbus glib udev libxml2 libxslt pcre zlib libjpeg libpng libtiff sqlite icu xcbutil xcbutilimage xcbutilkeysyms xcbutilwm libxkbcommon ] diff --git a/pkgs/development/tools/misc/eggdbus/default.nix b/pkgs/development/tools/misc/eggdbus/default.nix index 97031a533fae..9f04e2837222 100644 --- a/pkgs/development/tools/misc/eggdbus/default.nix +++ b/pkgs/development/tools/misc/eggdbus/default.nix @@ -8,7 +8,7 @@ stdenv.mkDerivation rec { sha256 = "118hj63ac65zlg71kydv4607qcg1qpdlql4kvhnwnnhar421jnq4"; }; - buildInputs = [ pkgconfig glib dbus.libs dbus_glib ]; + buildInputs = [ pkgconfig glib dbus dbus_glib ]; meta = { homepage = http://hal.freedesktop.org/releases/; diff --git a/pkgs/misc/cups/default.nix b/pkgs/misc/cups/default.nix index aa63fdaebc5e..fba194aa1527 100644 --- a/pkgs/misc/cups/default.nix +++ b/pkgs/misc/cups/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation { outputs = [ "dev" "out" "doc" "man" ]; # TODO: above buildInputs = [ pkgconfig zlib libjpeg libpng libtiff libusb gnutls avahi libpaper ] - ++ optionals stdenv.isLinux [ pam dbus.libs acl ]; + ++ optionals stdenv.isLinux [ pam dbus acl ]; propagatedBuildInputs = [ gmp ]; diff --git a/pkgs/os-specific/linux/bluez/bluez5.nix b/pkgs/os-specific/linux/bluez/bluez5.nix index b309b59f48ca..ce30b553253e 100644 --- a/pkgs/os-specific/linux/bluez/bluez5.nix +++ b/pkgs/os-specific/linux/bluez/bluez5.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { [ pythonDBus pygobject pygobject3 recursivePthLoader ]; buildInputs = - [ pkgconfig dbus.libs glib alsaLib python pythonPackages.wrapPython + [ pkgconfig dbus glib alsaLib 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 7f5a30144c8b..ba3f478ddc22 100644 --- a/pkgs/os-specific/linux/bluez/bluez5_28.nix +++ b/pkgs/os-specific/linux/bluez/bluez5_28.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { [ pythonDBus pygobject pygobject3 recursivePthLoader ]; buildInputs = - [ pkgconfig dbus.libs glib alsaLib python pythonPackages.wrapPython + [ pkgconfig dbus glib alsaLib 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/default.nix b/pkgs/os-specific/linux/bluez/default.nix index 23e5171d1780..4f30bc19caf8 100644 --- a/pkgs/os-specific/linux/bluez/default.nix +++ b/pkgs/os-specific/linux/bluez/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { }; buildInputs = - [ pkgconfig dbus.libs glib libusb alsaLib python makeWrapper + [ pkgconfig dbus glib libusb alsaLib python makeWrapper readline libsndfile # Disables GStreamer; not clear what it gains us other than a # zillion extra dependencies. diff --git a/pkgs/os-specific/linux/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix index d6827c81b28d..2d9f2070c251 100644 --- a/pkgs/os-specific/linux/systemd/default.nix +++ b/pkgs/os-specific/linux/systemd/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, pkgconfig, intltool, gperf, libcap, dbus, kmod +{ stdenv, fetchFromGitHub, pkgconfig, intltool, gperf, libcap, kmod , zlib, xz, pam, acl, cryptsetup, libuuid, m4, utillinux, libffi , glib, kbd, libxslt, coreutils, libgcrypt , kexectools, libmicrohttpd, linuxHeaders, libseccomp diff --git a/pkgs/servers/pulseaudio/default.nix b/pkgs/servers/pulseaudio/default.nix index 530f43fa8196..8ac37cef82f2 100644 --- a/pkgs/servers/pulseaudio/default.nix +++ b/pkgs/servers/pulseaudio/default.nix @@ -52,7 +52,7 @@ stdenv.mkDerivation rec { buildInputs = [ json_c libsndfile speexdsp fftwFloat ] - ++ lib.optionals stdenv.isLinux [ glib dbus.libs ] + ++ lib.optionals stdenv.isLinux [ glib dbus ] ++ lib.optionals (!libOnly) ( [ libasyncns webrtc-audio-processing ] ++ lib.optional jackaudioSupport libjack2 diff --git a/pkgs/servers/x11/xorg/overrides.nix b/pkgs/servers/x11/xorg/overrides.nix index 56abbb784e90..68c6f7929170 100644 --- a/pkgs/servers/x11/xorg/overrides.nix +++ b/pkgs/servers/x11/xorg/overrides.nix @@ -328,7 +328,7 @@ in version = (builtins.parseDrvName attrs.name).version; commonBuildInputs = attrs.buildInputs ++ [ xtrans ]; commonPropagatedBuildInputs = [ - args.zlib args.mesa args.dbus.libs + args.zlib args.mesa args.dbus xf86bigfontproto glproto xf86driproto compositeproto scrnsaverproto resourceproto xf86dgaproto diff --git a/pkgs/tools/bluetooth/obex-data-server/default.nix b/pkgs/tools/bluetooth/obex-data-server/default.nix index 53e854c34ebc..15167ee57b13 100644 --- a/pkgs/tools/bluetooth/obex-data-server/default.nix +++ b/pkgs/tools/bluetooth/obex-data-server/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { preConfigure = '' addToSearchPath PKG_CONFIG_PATH ${openobex}/lib64/pkgconfig - export PKG_CONFIG_PATH="${dbus_libs}/lib/pkgconfig:$PKG_CONFIG_PATH" + export PKG_CONFIG_PATH="${dbus_libs.dev}/lib/pkgconfig:$PKG_CONFIG_PATH" ''; meta = { diff --git a/pkgs/tools/bluetooth/obexd/default.nix b/pkgs/tools/bluetooth/obexd/default.nix index f900a81caa0e..a3486569b518 100644 --- a/pkgs/tools/bluetooth/obexd/default.nix +++ b/pkgs/tools/bluetooth/obexd/default.nix @@ -8,7 +8,7 @@ stdenv.mkDerivation rec { sha256 = "1i20dnibvnq9lnkkhajr5xx3kxlwf9q5c4jm19kyb0q1klzgzlb8"; }; - buildInputs = [ glib dbus.libs openobex bluez libical ]; + buildInputs = [ glib dbus openobex bluez libical ]; nativeBuildInputs = [ pkgconfig ]; diff --git a/pkgs/tools/system/thermald/default.nix b/pkgs/tools/system/thermald/default.nix index 9fe9adaedadb..dd28d5b2b1da 100644 --- a/pkgs/tools/system/thermald/default.nix +++ b/pkgs/tools/system/thermald/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { patchPhase = ''sed -e 's/upstartconfdir = \/etc\/init/upstartconfdir = $(out)\/etc\/init/' -i data/Makefile.am''; preConfigure = '' - export PKG_CONFIG_PATH="${dbus_libs}/lib/pkgconfig:$PKG_CONFIG_PATH" + export PKG_CONFIG_PATH="${dbus_libs.dev}/lib/pkgconfig:$PKG_CONFIG_PATH" ./autogen.sh #--prefix="$out" ''; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 84b984a71347..3af267d80470 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6073,8 +6073,8 @@ let }; # Should we deprecate these? Currently there are many references. - dbus_tools = pkgs.dbus.tools; - dbus_libs = pkgs.dbus.libs; + dbus_tools = pkgs.dbus.out; + dbus_libs = pkgs.dbus; dbus_daemon = pkgs.dbus.daemon; dhex = callPackage ../applications/editors/dhex { };