ppp: add withSystemd option

Not all platforms support systemd.  This fixes e.g. pkgsStatic.ppp.

Fixes: 8990531424 ("ppp: add systemd sd-notify support")
This commit is contained in:
Alyssa Ross
2024-12-26 22:04:28 +01:00
parent 2d17dd2685
commit 32eb7980e1

View File

@@ -10,6 +10,7 @@
openssl,
pkg-config,
stdenv,
withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemdMinimal,
systemdMinimal,
}:
@@ -28,7 +29,7 @@ stdenv.mkDerivation rec {
"--localstatedir=/var"
"--sysconfdir=/etc"
"--with-openssl=${openssl.dev}"
"--enable-systemd"
(lib.enableFeature withSystemd "systemd")
];
nativeBuildInputs = [
@@ -36,14 +37,17 @@ stdenv.mkDerivation rec {
autoreconfHook
];
buildInputs = [
bash
libpcap
libxcrypt
linux-pam
openssl
systemdMinimal
];
buildInputs =
[
bash
libpcap
libxcrypt
linux-pam
openssl
]
++ lib.optionals withSystemd [
systemdMinimal
];
postPatch = ''
for file in $(find -name Makefile.linux); do