diff --git a/pkgs/applications/networking/browsers/firefox3b1/3b2.nix b/pkgs/applications/networking/browsers/firefox3b1/3b2.nix index 29ea90d9d893..bf812f6a7ad9 100644 --- a/pkgs/applications/networking/browsers/firefox3b1/3b2.nix +++ b/pkgs/applications/networking/browsers/firefox3b1/3b2.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation { buildInputs = [ pkgconfig gtk perl zip libIDL libXi libjpeg libpng zlib cairo - python curl coreutils dbus dbus_glib pango freetype fontconfig + python curl coreutils dbus.libs dbus_glib pango freetype fontconfig libX11 libXrender libXft libXt ]; diff --git a/pkgs/applications/window-managers/compiz-fusion/general-dependencies.nix b/pkgs/applications/window-managers/compiz-fusion/general-dependencies.nix index 717d66e2c29b..f02857cf80a9 100644 --- a/pkgs/applications/window-managers/compiz-fusion/general-dependencies.nix +++ b/pkgs/applications/window-managers/compiz-fusion/general-dependencies.nix @@ -4,6 +4,6 @@ build-essential libxcomposite-dev libpng12-dev libsm-dev libxrandr-dev libxdamag args: with args; [ libpng - GConf mesa metacity librsvg dbus dbus_glib gnomedesktop git autoconf automake + GConf mesa metacity librsvg dbus.libs dbus_glib gnomedesktop git autoconf automake libtool libxslt libwnck intltool perl perlXMLParser compiz ] diff --git a/pkgs/applications/window-managers/compiz/0.6.2.nix b/pkgs/applications/window-managers/compiz/0.6.2.nix index 78369081bc9d..8827b3cb7a06 100644 --- a/pkgs/applications/window-managers/compiz/0.6.2.nix +++ b/pkgs/applications/window-managers/compiz/0.6.2.nix @@ -14,7 +14,7 @@ args : with args; propagatedBuildInputs = [ libpng libXcomposite libXfixes libXdamage libXrandr libXinerama libICE libSM startupnotification mesa GConf perl perlXMLParser libxslt - dbus dbus_glib compositeproto fixesproto damageproto randrproto + dbus.libs dbus_glib compositeproto fixesproto damageproto randrproto xineramaproto renderproto kbproto xextproto libXrender ]; configureFlags = ["--enable-gtk" "--enable-fuse" diff --git a/pkgs/applications/window-managers/compiz/extra.nix b/pkgs/applications/window-managers/compiz/extra.nix index 501518d3f679..70f4e5dd8c38 100644 --- a/pkgs/applications/window-managers/compiz/extra.nix +++ b/pkgs/applications/window-managers/compiz/extra.nix @@ -8,7 +8,7 @@ stdenv.mkDerivation { sha256 = "7fc7faafccfdf22dea7ac1de6629dcb55ec63d84fcb57a14559309cf284fa94f"; }; buildInputs = [ - pkgconfig compiz perl perlXMLParser GConf dbus gtk + pkgconfig compiz perl perlXMLParser GConf dbus.libs gtk ]; preBuild = " makeFlagsArray=(moduledir=$out/lib/compiz) diff --git a/pkgs/development/libraries/dbus-glib/default.nix b/pkgs/development/libraries/dbus-glib/default.nix index 8324980126ca..2476ba4fabd5 100644 --- a/pkgs/development/libraries/dbus-glib/default.nix +++ b/pkgs/development/libraries/dbus-glib/default.nix @@ -8,7 +8,7 @@ stdenv.mkDerivation rec { }; inherit dbus glib; buildInputs = [pkgconfig gettext glib expat]; - propagatedBuildInputs = [dbus]; + propagatedBuildInputs = [dbus.libs]; meta = { homepage = http://dbus.freedesktop.org; diff --git a/pkgs/development/libraries/dbus/default.nix b/pkgs/development/libraries/dbus/default.nix index cd4b8f49e05f..04f08be8853b 100644 --- a/pkgs/development/libraries/dbus/default.nix +++ b/pkgs/development/libraries/dbus/default.nix @@ -1,22 +1,38 @@ -{stdenv, fetchurl, pkgconfig, expat}: - -stdenv.mkDerivation { - name = "dbus-1.0.2"; +args: with args; +let + version = "1.0.2"; src = fetchurl { - url = http://dbus.freedesktop.org/releases/dbus/dbus-1.0.2.tar.gz; + url = "http://dbus.freedesktop.org/releases/dbus/dbus-${version}.tar.gz"; sha256 = "1jn652zb81mczsx4rdcwrrzj3lfhx9d107zjfnasc4l5yljl204a"; }; - buildInputs = [pkgconfig expat]; - configureFlags = "--without-x --localstatedir=/var"; + configureFlags = "--disable-static --localstatedir=/var --with-session-socket-dir=/tmp"; +in rec { + libs = stdenv.mkDerivation { + name = "dbus-library-" + version; + buildInputs = [pkgconfig expat]; + inherit src configureFlags; + patchPhase = '' + sed -i /mkinstalldirs.*localstatedir/d bus/Makefile.in + sed -i '/SUBDIRS/s/ tools//' Makefile.in + ''; + }; - # Awful hack: `make install' wants to write in /var, but it - # can't. So redirect it with a DESTDIR. - preInstall = " - installFlagsArray=(DESTDIR=$out/destdir) - "; + tools = stdenv.mkDerivation { + name = "dbus-tools-" + version; + inherit src configureFlags; + buildInputs = [pkgconfig expat libs] + ++ if useX11 then [libX11 libICE libSM] else []; + postConfigure = "cd tools"; - postInstall = " - mv $out/destdir/$out/* $out - rm -rf $out/destdir - "; + NIX_LDFLAGS = "-ldbus-1"; + makeFlags = "DBUS_DAEMONDIR=${daemon}/bin"; + + patchPhase = '' + sed -i 's@ $(top_builddir)/dbus/libdbus-1.la@@' tools/Makefile.in + sed -i '/mkdir.*localstate/d' tools/Makefile.in + ''; + }; + +# I'm too lazy to separate daemon and libs now. + daemon = libs; } diff --git a/pkgs/development/libraries/libnotify/default.nix b/pkgs/development/libraries/libnotify/default.nix index 42747db95a1b..8b58fe857e9d 100644 --- a/pkgs/development/libraries/libnotify/default.nix +++ b/pkgs/development/libraries/libnotify/default.nix @@ -1,7 +1,4 @@ -{ stdenv, fetchurl -, pkgconfig, dbus, dbus_glib -, gtk, glib -}: +args: with args; stdenv.mkDerivation { name = "libnotify-0.4.4"; @@ -13,7 +10,7 @@ stdenv.mkDerivation { }; buildInputs = [ - pkgconfig dbus dbus_glib gtk glib + pkgconfig dbus.libs dbus_glib gtk glib ]; configureFlags=""; diff --git a/pkgs/development/libraries/qt-4/default.nix b/pkgs/development/libraries/qt-4/default.nix index 2d6366c81d73..2d05ad22db0e 100644 --- a/pkgs/development/libraries/qt-4/default.nix +++ b/pkgs/development/libraries/qt-4/default.nix @@ -4,7 +4,7 @@ rec { setupHook = ./setup-hook.sh; propagatedBuildInputs = [libXft libXrender libXrandr randrproto xextproto libXinerama xineramaproto libXcursor zlib libjpeg mysql libpng which mesa - libXmu openssl dbus cups pkgconfig libXext freetype fontconfig inputproto + libXmu openssl dbus.libs cups pkgconfig libXext freetype fontconfig inputproto fixesproto libXfixes glib libtiff]; prefixKey = "-prefix "; configureFlags = " diff --git a/pkgs/os-specific/linux/hal/default.nix b/pkgs/os-specific/linux/hal/default.nix index 1fc012981053..ce41a29a9fe8 100644 --- a/pkgs/os-specific/linux/hal/default.nix +++ b/pkgs/os-specific/linux/hal/default.nix @@ -1,8 +1,4 @@ -{ stdenv, fetchurl, pkgconfig, python, pciutils, usbutils, expat -, libusb, dbus, dbus_glib, glib, libvolume_id, perl, perlXMLParser -, gettext, zlib /* required by pciutils */, eject, libsmbios -, udev -}: +args: with args; stdenv.mkDerivation { name = "hal-0.5.9"; @@ -13,7 +9,7 @@ stdenv.mkDerivation { }; buildInputs = [ - pkgconfig python pciutils expat libusb dbus dbus_glib glib + pkgconfig python pciutils expat libusb dbus.libs dbus_glib glib libvolume_id perl perlXMLParser gettext zlib libsmbios ]; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1c8211d7fcad..9bcb581aedeb 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1825,20 +1825,11 @@ rec { inherit fetchurl stdenv; }; - # I think, this is a bad practice to use getVersion for various build - # variants, but it's 5 o'clock now... - dbus = getVersion "dbus" dbus_alts; - - dbus_alts = rec - { - noX11 = import ../development/libraries/dbus { + dbus = import ../development/libraries/dbus { inherit fetchurl stdenv pkgconfig expat; - }; - withX11 = import ../development/libraries/dbus_x { - inherit fetchurl stdenv pkgconfig expat; inherit (xlibs) libX11 libICE libSM; - }; - default = noX11; + useX11 = getConfig [ "dbus" "tools" "useX11" ] + (getConfig [ "services" "xserver" "enable" ] false); }; dbus_glib = import ../development/libraries/dbus-glib { @@ -4955,7 +4946,7 @@ rec { xineLib libgphoto2 djvulibre libogg lame libvorbis poppler readline saneBackends chmlib python libzip gmp sqlite libidn runCommand lib openbabel ocaml facile stdenv jasper fam indilib libnova - libarchive; + libarchive dbus; flac = builtins.getAttr "1.1.2" flacAlts; cdparanoia = cdparanoiaIII; inherit (xlibs) @@ -4966,7 +4957,6 @@ rec { libxkbfile libXinerama libpthreadstubs libXxf86vm xset xprop; inherit (gtkLibs) glib; qt = qt4; - dbus = dbus_alts.withX11; bison = bison23; openexr = openexr_1_6_1 ; });