summary refs log tree commit diff
path: root/pkgs/os-specific/linux/systemd/default.nix
diff options
context:
space:
mode:
authorAndreas Rammhold <andreas@rammhold.de>2021-12-12 15:49:40 +0100
committerFlorian Klink <flokli@flokli.de>2022-03-05 21:27:45 +0100
commit3ceeae830d42e7857981d11ad251c4f39e2fdd4b (patch)
tree1c7b0c2aee98d6a61f7bbcb77c8ff2b86ed02a95 /pkgs/os-specific/linux/systemd/default.nix
parent3869ce784e80445cc6037999b087e7ca61ebf60f (diff)
downloadnixpkgs-3ceeae830d42e7857981d11ad251c4f39e2fdd4b.tar
nixpkgs-3ceeae830d42e7857981d11ad251c4f39e2fdd4b.tar.gz
nixpkgs-3ceeae830d42e7857981d11ad251c4f39e2fdd4b.tar.bz2
nixpkgs-3ceeae830d42e7857981d11ad251c4f39e2fdd4b.tar.lz
nixpkgs-3ceeae830d42e7857981d11ad251c4f39e2fdd4b.tar.xz
nixpkgs-3ceeae830d42e7857981d11ad251c4f39e2fdd4b.tar.zst
nixpkgs-3ceeae830d42e7857981d11ad251c4f39e2fdd4b.zip
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.
Diffstat (limited to 'pkgs/os-specific/linux/systemd/default.nix')
-rw-r--r--pkgs/os-specific/linux/systemd/default.nix8
1 files changed, 4 insertions, 4 deletions
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}"