diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/dbus/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/dbus/default.nix | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/nixpkgs/pkgs/development/libraries/dbus/default.nix b/nixpkgs/pkgs/development/libraries/dbus/default.nix index 1d1df0d24fc7..a3c5bbbf70be 100644 --- a/nixpkgs/pkgs/development/libraries/dbus/default.nix +++ b/nixpkgs/pkgs/development/libraries/dbus/default.nix @@ -1,9 +1,10 @@ { stdenv , lib +, fetchpatch , fetchurl , pkg-config , expat -, enableSystemd ? stdenv.isLinux && !stdenv.hostPlatform.isMusl +, enableSystemd ? stdenv.isLinux && !stdenv.hostPlatform.isStatic , systemd , audit , libapparmor @@ -15,6 +16,8 @@ , docbook_xml_dtd_44 , docbook-xsl-nons , xmlto +, autoreconfHook +, autoconf-archive }: stdenv.mkDerivation rec { @@ -32,15 +35,23 @@ stdenv.mkDerivation rec { # Also applied upstream in https://gitlab.freedesktop.org/dbus/dbus/-/merge_requests/189, # expected in version 1.14 ./docs-reproducible-ids.patch + # AC_PATH_XTRA doesn't seem to find X11 libs even though libX11 seems + # to provide valid pkg-config files. This replace AC_PATH_XTRA with + # PKG_CHECK_MODULES. + # MR merged cf https://gitlab.freedesktop.org/dbus/dbus/-/merge_requests/212/diffs?commit_id=23880a181e82ee7f + (fetchpatch { + url = "https://gitlab.freedesktop.org/dbus/dbus/-/commit/6bfaea0707ba1a7788c4b6d30c18fb094f3a1dd4.patch"; + sha256 = "1d8ay55n2ksw5faqx3hsdpfni3xl3gq9hnjl65073xcfnx67x8d2"; + }) ] ++ (lib.optional stdenv.isSunOS ./implement-getgrouplist.patch); postPatch = '' - substituteInPlace tools/Makefile.in \ - --replace 'install-localstatelibDATA:' 'disabled:' \ + substituteInPlace bus/Makefile.am \ + --replace 'install-data-hook:' 'disabled:' \ + --replace '$(mkinstalldirs) $(DESTDIR)$(localstatedir)/run/dbus' ':' + substituteInPlace tools/Makefile.am \ --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\"" @@ -51,6 +62,8 @@ stdenv.mkDerivation rec { outputs = [ "out" "dev" "lib" "doc" "man" ]; nativeBuildInputs = [ + autoreconfHook + autoconf-archive pkg-config docbook_xml_dtd_44 docbook-xsl-nons @@ -86,10 +99,6 @@ stdenv.mkDerivation rec { ] ++ lib.optional (!x11Support) "--without-x" ++ lib.optionals stdenv.isLinux [ "--enable-apparmor" "--enable-libaudit" ]; - # 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. - # problems building without x11Support so disabled in that case for now - NIX_CFLAGS_COMPILE = lib.optionalString x11Support "-DDBUS_ENABLE_X11_AUTOLAUNCH=1"; NIX_CFLAGS_LINK = lib.optionalString (!stdenv.isDarwin) "-Wl,--as-needed"; enableParallelBuilding = true; |