Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 17 additions & 4 deletions pkgs/development/libraries/dbus/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{ stdenv
, lib
, fetchpatch
, fetchurl
, pkg-config
, expat
Expand All @@ -15,6 +16,8 @@
, docbook_xml_dtd_44
, docbook-xsl-nons
, xmlto
, autoreconfHook
, autoconf-archive
}:

stdenv.mkDerivation rec {
Expand All @@ -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\""
Expand All @@ -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
Expand Down
15 changes: 14 additions & 1 deletion pkgs/os-specific/linux/util-linux/default.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
{ lib, stdenv, fetchurl, pkg-config, zlib, shadow, libcap_ng
, ncurses ? null, pam, systemd ? null
, nlsSupport ? true
, audit ? null
}:

assert stdenv.hostPlatform.isStatic -> audit != null;

stdenv.mkDerivation rec {
pname = "util-linux";
version = "2.37.2";
Expand Down Expand Up @@ -57,7 +60,17 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ pkg-config ];
buildInputs =
[ zlib pam libcap_ng ]
++ lib.filter (p: p != null) [ ncurses systemd ];
++ lib.filter (p: p != null) [ ncurses systemd ]
# not sure how util-linux is linking with linux-pam,
# probably just with a simplistic -lpam.
# linux-pam doesn't seem to have a .pc file so I can't
# add -laudit to the Requires.private.
# libaudit is also needed directly anyway cf login-utils/login.c
# and sys-utils/hwclock.c, not sure how we got it working
# without audit on dynamic builds.
++ lib.optionals stdenv.hostPlatform.isStatic [ audit ];

NIX_CFLAGS_LINK = lib.optionalString stdenv.hostPlatform.isStatic "-laudit";

doCheck = false; # "For development purpose only. Don't execute on production system!"

Expand Down