dbus: attempt to fix build on FreeBSD and Darwin

Also build it there.
This commit is contained in:
Vladimír Čunát 2013-06-18 14:59:32 +02:00
parent aeaaa0a7e7
commit ab7d7333be

View file

@ -13,7 +13,7 @@ let
# also other parts than "libs" need this statically linked lib # also other parts than "libs" need this statically linked lib
makeInternalLib = "(cd dbus && make libdbus-internal.la)"; makeInternalLib = "(cd dbus && make libdbus-internal.la)";
systemdOrEmpty = stdenv.lib.optional stdenv.isLinux systemd; systemdOrEmpty = lib.optional stdenv.isLinux systemd;
# A generic builder for individual parts (subdirs) of D-Bus # A generic builder for individual parts (subdirs) of D-Bus
dbus_drv = name: subdirs: merge: stdenv.mkDerivation (lib.mergeAttrsByFuncDefaultsClean [{ dbus_drv = name: subdirs: merge: stdenv.mkDerivation (lib.mergeAttrsByFuncDefaultsClean [{
@ -42,10 +42,9 @@ let
doCheck = true; doCheck = true;
patches = [ patches = [ ./ignore-missing-includedirs.patch ]
./ignore-missing-includedirs.patch ./implement-getgrouplist.patch ++ lib.optional (stdenv.isSunOS || stdenv.isLinux/*avoid rebuilds*/) ./implement-getgrouplist.patch
./ucred-dirty-hack.patch ./no-create-dirs.patch ++ [ ./ucred-dirty-hack.patch ./no-create-dirs.patch ];
];
nativeBuildInputs = [ pkgconfig ]; nativeBuildInputs = [ pkgconfig ];
propagatedBuildInputs = [ expat ]; propagatedBuildInputs = [ expat ];
@ -85,6 +84,8 @@ in rec {
configureFlags = [ "--with-dbus-daemondir=${daemon}/bin" ]; configureFlags = [ "--with-dbus-daemondir=${daemon}/bin" ];
buildInputs = buildInputsX ++ systemdOrEmpty ++ [ libs daemon dbus_glib ]; buildInputs = buildInputsX ++ systemdOrEmpty ++ [ libs daemon dbus_glib ];
NIX_CFLAGS_LINK = "-Wl,--as-needed -ldbus-1"; NIX_CFLAGS_LINK = "-Wl,--as-needed -ldbus-1";
meta.platforms = stdenv.lib.platforms.all;
}; };
daemon = dbus_drv "daemon" "bus" { daemon = dbus_drv "daemon" "bus" {