summary refs log tree commit diff
path: root/pkgs/os-specific/linux/systemd
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2020-10-28 00:02:24 +0100
committerFlorian Klink <flokli@flokli.de>2020-10-28 23:24:17 +0100
commitff07c6b47d770ef110e7f2e6d8fc35ae020681e5 (patch)
tree6e954f0daa65271297447063c22345f0c4fca8bd /pkgs/os-specific/linux/systemd
parent5f257d7d2cd66cd5bcf832245e6d2734e2798381 (diff)
downloadnixpkgs-ff07c6b47d770ef110e7f2e6d8fc35ae020681e5.tar
nixpkgs-ff07c6b47d770ef110e7f2e6d8fc35ae020681e5.tar.gz
nixpkgs-ff07c6b47d770ef110e7f2e6d8fc35ae020681e5.tar.bz2
nixpkgs-ff07c6b47d770ef110e7f2e6d8fc35ae020681e5.tar.lz
nixpkgs-ff07c6b47d770ef110e7f2e6d8fc35ae020681e5.tar.xz
nixpkgs-ff07c6b47d770ef110e7f2e6d8fc35ae020681e5.tar.zst
nixpkgs-ff07c6b47d770ef110e7f2e6d8fc35ae020681e5.zip
systemd: introduce withCompression flag
This will build systemd without some compression utils, useful for
systemdMinimal.
Diffstat (limited to 'pkgs/os-specific/linux/systemd')
-rw-r--r--pkgs/os-specific/linux/systemd/default.nix9
1 files changed, 4 insertions, 5 deletions
diff --git a/pkgs/os-specific/linux/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix
index 4b64c8d523e..f9c12ca9b86 100644
--- a/pkgs/os-specific/linux/systemd/default.nix
+++ b/pkgs/os-specific/linux/systemd/default.nix
@@ -55,6 +55,7 @@
 , kexectools
 , bashInteractive
 
+, withCompression ? true  # adds bzip2, lz4 and xz
 , withCryptsetup ? true
 , withEfi ? stdenv.hostPlatform.isEfi
 , withHostnamed ? true
@@ -81,7 +82,7 @@
 assert withResolved -> (libgcrypt != null && libgpgerror != null);
 assert withImportd ->
 (curl.dev != null && zlib != null && xz != null && libgcrypt != null
-  && gnutar != null && gnupg != null);
+  && gnutar != null && gnupg != null && withCompression );
 
 assert withRemote -> lib.getDev curl != null;
 
@@ -168,7 +169,6 @@ stdenv.mkDerivation {
     [
       acl
       audit
-      bzip2
       glib
       kmod
       libapparmor
@@ -179,12 +179,11 @@ stdenv.mkDerivation {
       libidn2
       libuuid
       linuxHeaders
-      lz4
       pam
       pcre2
-      xz
     ]
     ++ lib.optional wantCurl (lib.getDev curl)
+    ++ lib.optionals withCompression [ bzip2 lz4 xz ]
     ++ lib.optional withNetworkd iptables
     ++ lib.optional withKexectools kexectools
     ++ lib.optional withLibseccomp libseccomp
@@ -211,7 +210,7 @@ stdenv.mkDerivation {
     # while we do not run tests we should also not build them. Removes about 600 targets
     "-Dtests=false"
     "-Dimportd=${lib.boolToString withImportd}"
-    "-Dlz4=true"
+    "-Dlz4=${lib.boolToString withCompression}"
     "-Dhomed=false"
     "-Dlogind=${lib.boolToString withLogind}"
     "-Dlocaled=${lib.boolToString withLocaled}"