diff --git a/pkgs/by-name/pp/ppp/package.nix b/pkgs/by-name/pp/ppp/package.nix index 2316092ccfbc..562bc812dfd7 100644 --- a/pkgs/by-name/pp/ppp/package.nix +++ b/pkgs/by-name/pp/ppp/package.nix @@ -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