From ff07c6b47d770ef110e7f2e6d8fc35ae020681e5 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Wed, 28 Oct 2020 00:02:24 +0100 Subject: systemd: introduce withCompression flag This will build systemd without some compression utils, useful for systemdMinimal. --- pkgs/os-specific/linux/systemd/default.nix | 9 ++++----- pkgs/top-level/all-packages.nix | 1 + 2 files changed, 5 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}" diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 456b43a9c1e..6d2eb4253d8 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -18670,6 +18670,7 @@ in withHwdb = false; withEfi = false; withImportd = false; + withCompression = false; withCryptsetup = false; glib = null; lvm2 = null; -- cgit 1.4.1