systemd: disable pam in transitive dependencies if pam is disabled

This commit is contained in:
Grimmauld
2025-08-10 11:05:20 +02:00
parent 7d9a26a0b4
commit 0ce91c70d8
+7 -4
View File
@@ -203,6 +203,8 @@ let
# $ curl -s https://api.github.com/repos/systemd/systemd/releases/latest | \
# jq '.created_at|strptime("%Y-%m-%dT%H:%M:%SZ")|mktime'
releaseTimestamp = "1734643670";
kbd' = if withPam then kbd else kbd.override { withVlock = false; };
in
stdenv.mkDerivation (finalAttrs: {
inherit pname version;
@@ -396,7 +398,7 @@ stdenv.mkDerivation (finalAttrs: {
buildInputs = [
libxcrypt
libcap
(if withPam then libcap else libcap.override { usePam = false; })
libuuid
linuxHeaders
bashInteractive # for patch shebangs
@@ -485,8 +487,8 @@ stdenv.mkDerivation (finalAttrs: {
(lib.mesonOption "pkgconfigdatadir" "${placeholder "dev"}/share/pkgconfig")
# Keyboard
(lib.mesonOption "loadkeys-path" "${kbd}/bin/loadkeys")
(lib.mesonOption "setfont-path" "${kbd}/bin/setfont")
(lib.mesonOption "loadkeys-path" "${kbd'}/bin/loadkeys")
(lib.mesonOption "setfont-path" "${kbd'}/bin/setfont")
# SBAT
(lib.mesonOption "sbat-distro" "nixos")
@@ -923,9 +925,10 @@ stdenv.mkDerivation (finalAttrs: {
withUtmp
util-linux
kmod
kbd
;
kbd = kbd';
# Many TPM2-related units are only installed if this trio of features are
# enabled. See https://github.com/systemd/systemd/blob/876ee10e0eb4bbb0920bdab7817a9f06cc34910f/units/meson.build#L521
withTpm2Units = withTpm2Tss && withBootloader && withOpenSSL;