systemd: introduce withCompression flag

This will build systemd without some compression utils, useful for
systemdMinimal.
This commit is contained in:
Florian Klink 2020-10-28 00:02:24 +01:00
parent 5f257d7d2c
commit ff07c6b47d
2 changed files with 5 additions and 5 deletions

View file

@ -55,6 +55,7 @@
, kexectools , kexectools
, bashInteractive , bashInteractive
, withCompression ? true # adds bzip2, lz4 and xz
, withCryptsetup ? true , withCryptsetup ? true
, withEfi ? stdenv.hostPlatform.isEfi , withEfi ? stdenv.hostPlatform.isEfi
, withHostnamed ? true , withHostnamed ? true
@ -81,7 +82,7 @@
assert withResolved -> (libgcrypt != null && libgpgerror != null); assert withResolved -> (libgcrypt != null && libgpgerror != null);
assert withImportd -> assert withImportd ->
(curl.dev != null && zlib != null && xz != null && libgcrypt != null (curl.dev != null && zlib != null && xz != null && libgcrypt != null
&& gnutar != null && gnupg != null); && gnutar != null && gnupg != null && withCompression );
assert withRemote -> lib.getDev curl != null; assert withRemote -> lib.getDev curl != null;
@ -168,7 +169,6 @@ stdenv.mkDerivation {
[ [
acl acl
audit audit
bzip2
glib glib
kmod kmod
libapparmor libapparmor
@ -179,12 +179,11 @@ stdenv.mkDerivation {
libidn2 libidn2
libuuid libuuid
linuxHeaders linuxHeaders
lz4
pam pam
pcre2 pcre2
xz
] ]
++ lib.optional wantCurl (lib.getDev curl) ++ lib.optional wantCurl (lib.getDev curl)
++ lib.optionals withCompression [ bzip2 lz4 xz ]
++ lib.optional withNetworkd iptables ++ lib.optional withNetworkd iptables
++ lib.optional withKexectools kexectools ++ lib.optional withKexectools kexectools
++ lib.optional withLibseccomp libseccomp ++ 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 # while we do not run tests we should also not build them. Removes about 600 targets
"-Dtests=false" "-Dtests=false"
"-Dimportd=${lib.boolToString withImportd}" "-Dimportd=${lib.boolToString withImportd}"
"-Dlz4=true" "-Dlz4=${lib.boolToString withCompression}"
"-Dhomed=false" "-Dhomed=false"
"-Dlogind=${lib.boolToString withLogind}" "-Dlogind=${lib.boolToString withLogind}"
"-Dlocaled=${lib.boolToString withLocaled}" "-Dlocaled=${lib.boolToString withLocaled}"

View file

@ -18670,6 +18670,7 @@ in
withHwdb = false; withHwdb = false;
withEfi = false; withEfi = false;
withImportd = false; withImportd = false;
withCompression = false;
withCryptsetup = false; withCryptsetup = false;
glib = null; glib = null;
lvm2 = null; lvm2 = null;