From 3ceeae830d42e7857981d11ad251c4f39e2fdd4b Mon Sep 17 00:00:00 2001 From: Andreas Rammhold Date: Sun, 12 Dec 2021 15:49:40 +0100 Subject: systemdMinimal: don't set {libfido2,p11-kit,libgcrypt} to null We don't have to do that as we already set all the feature flags to null. Setting individual libraries to null instead of disabling their feature flag will lead with bad example that will cause each of the features to be disabled with multiple flags in the systemdMinimal variant. If a dependency is pulled in via another feature we should disable that rather than setting it to null. Overriding a given package should be the last resort. --- pkgs/os-specific/linux/systemd/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'pkgs/os-specific/linux/systemd/default.nix') diff --git a/pkgs/os-specific/linux/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix index 95782d2c075..c1217510813 100644 --- a/pkgs/os-specific/linux/systemd/default.nix +++ b/pkgs/os-specific/linux/systemd/default.nix @@ -61,6 +61,8 @@ , kexec-tools , bashInteractive , libmicrohttpd +, libfido2 +, p11-kit # the (optional) BPF feature requires bpftool, libbpf, clang and llmv-strip to be avilable during build time. # Only libbpf should be a runtime dependency. @@ -97,8 +99,6 @@ , withTimesyncd ? true , withTpm2Tss ? !stdenv.hostPlatform.isMusl , withUserDb ? !stdenv.hostPlatform.isMusl -, libfido2 -, p11-kit # name argument , pname ? "systemd" @@ -373,13 +373,13 @@ stdenv.mkDerivation { glib kmod libcap - libgcrypt libidn2 libuuid linuxHeaders pam ] + ++ lib.optional wantGcrypt libgcrypt ++ lib.optional withApparmor libapparmor ++ lib.optional wantCurl (lib.getDev curl) ++ lib.optionals withCompression [ bzip2 lz4 xz zstd ] @@ -418,7 +418,7 @@ stdenv.mkDerivation { # while we do not run tests we should also not build them. Removes about 600 targets "-Dtests=false" "-Danalyze=${lib.boolToString withAnalyze}" - "-Dgcrypt=${lib.boolToString (libgcrypt != null)}" + "-Dgcrypt=${lib.boolToString wantGcrypt}" "-Dimportd=${lib.boolToString withImportd}" "-Dlz4=${lib.boolToString withCompression}" "-Dhomed=${lib.boolToString withHomed}" -- cgit 1.4.1