summary refs log tree commit diff
path: root/pkgs/os-specific/linux/systemd
diff options
context:
space:
mode:
authorFrederik Rietdijk <fridh@fridh.nl>2020-11-27 15:09:19 +0100
committerFrederik Rietdijk <fridh@fridh.nl>2020-11-27 15:09:19 +0100
commitb2a3891e12777fa5e16bc93bc95c0d5ba256ebaf (patch)
tree220c385a8657d85bb6b305819a1842a3b1f4079c /pkgs/os-specific/linux/systemd
parent977848375167f4671a03ccc0dbf5896f4cf0d3fe (diff)
parentbe36f6f0a0ffbeef228a021f5a343f5ce7a183de (diff)
downloadnixpkgs-b2a3891e12777fa5e16bc93bc95c0d5ba256ebaf.tar
nixpkgs-b2a3891e12777fa5e16bc93bc95c0d5ba256ebaf.tar.gz
nixpkgs-b2a3891e12777fa5e16bc93bc95c0d5ba256ebaf.tar.bz2
nixpkgs-b2a3891e12777fa5e16bc93bc95c0d5ba256ebaf.tar.lz
nixpkgs-b2a3891e12777fa5e16bc93bc95c0d5ba256ebaf.tar.xz
nixpkgs-b2a3891e12777fa5e16bc93bc95c0d5ba256ebaf.tar.zst
nixpkgs-b2a3891e12777fa5e16bc93bc95c0d5ba256ebaf.zip
Merge master into staging-next
Diffstat (limited to 'pkgs/os-specific/linux/systemd')
-rw-r--r--pkgs/os-specific/linux/systemd/default.nix53
1 files changed, 27 insertions, 26 deletions
diff --git a/pkgs/os-specific/linux/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix
index 084ac1da9af..f7a51ff9a03 100644
--- a/pkgs/os-specific/linux/systemd/default.nix
+++ b/pkgs/os-specific/linux/systemd/default.nix
@@ -18,7 +18,7 @@
 
   # Mandatory dependencies
 , libcap
-, utillinux
+, util-linux
 , kbd
 , kmod
 
@@ -57,11 +57,12 @@
 
 , withAnalyze ? true
 , withApparmor ? true
-, withCoredump ? true
 , withCompression ? true  # adds bzip2, lz4 and xz
+, withCoredump ? true
 , withCryptsetup ? true
 , withDocumentation ? true
 , withEfi ? stdenv.hostPlatform.isEfi
+, withHomed ? false
 , withHostnamed ? true
 , withHwdb ? true
 , withImportd ? true
@@ -72,14 +73,15 @@
 , withNss ? true
 , withPCRE2 ? true
 , withPolkit ? true
+, withPortabled ? false
 , withRemote ? true
 , withResolved ? true
 , withShellCompletions ? true
 , withTimedated ? true
 , withTimesyncd ? true
 , withUserDb ? true
-, withHomed ? false, p11-kit, libfido2
-# , withPortabled ? false TODO
+, p11-kit
+, libfido2
 
   # name argument
 , pname ? "systemd"
@@ -94,7 +96,7 @@
 assert withResolved -> (libgcrypt != null && libgpgerror != null);
 assert withImportd ->
 (curl.dev != null && zlib != null && xz != null && libgcrypt != null
-  && gnutar != null && gnupg != null && withCompression );
+  && gnutar != null && gnupg != null && withCompression);
 
 assert withEfi -> (gnu-efi != null);
 assert withRemote -> lib.getDev curl != null;
@@ -104,7 +106,6 @@ assert withHomed -> withCryptsetup;
 
 assert withCryptsetup ->
 (cryptsetup != null);
-
 let
   wantCurl = withRemote || withImportd;
 
@@ -196,20 +197,20 @@ stdenv.mkDerivation {
       pam
     ]
 
-    ++ lib.optional  withApparmor libapparmor
-    ++ lib.optional  wantCurl (lib.getDev curl)
+    ++ lib.optional withApparmor libapparmor
+    ++ lib.optional wantCurl (lib.getDev curl)
     ++ lib.optionals withCompression [ bzip2 lz4 xz ]
-    ++ lib.optional  withCryptsetup (lib.getDev cryptsetup.dev)
-    ++ lib.optional  withEfi gnu-efi
-    ++ lib.optional  withKexectools kexectools
-    ++ lib.optional  withLibseccomp libseccomp
-    ++ lib.optional  withNetworkd iptables
-    ++ lib.optional  withPCRE2 pcre2
-    ++ lib.optional  withResolved libgpgerror
-    ++ lib.optional  withSelinux libselinux
-    ++ lib.optional  withRemote libmicrohttpd
+    ++ lib.optional withCryptsetup (lib.getDev cryptsetup.dev)
+    ++ lib.optional withEfi gnu-efi
+    ++ lib.optional withKexectools kexectools
+    ++ lib.optional withLibseccomp libseccomp
+    ++ lib.optional withNetworkd iptables
+    ++ lib.optional withPCRE2 pcre2
+    ++ lib.optional withResolved libgpgerror
+    ++ lib.optional withSelinux libselinux
+    ++ lib.optional withRemote libmicrohttpd
     ++ lib.optionals withHomed [ p11-kit libfido2 ]
-    ;
+  ;
 
   #dontAddPrefix = true;
 
@@ -240,7 +241,7 @@ stdenv.mkDerivation {
     "-Dnetworkd=${lib.boolToString withNetworkd}"
     "-Dpolkit=${lib.boolToString withPolkit}"
     "-Dcryptsetup=${lib.boolToString withCryptsetup}"
-    "-Dportabled=false"
+    "-Dportabled=${lib.boolToString withPortabled}"
     "-Dhwdb=${lib.boolToString withHwdb}"
     "-Dremote=${lib.boolToString withRemote}"
     "-Dsysusers=false"
@@ -277,9 +278,9 @@ stdenv.mkDerivation {
 
     "-Dkill-path=${coreutils}/bin/kill"
     "-Dkmod-path=${kmod}/bin/kmod"
-    "-Dsulogin-path=${utillinux}/bin/sulogin"
-    "-Dmount-path=${utillinux}/bin/mount"
-    "-Dumount-path=${utillinux}/bin/umount"
+    "-Dsulogin-path=${util-linux}/bin/sulogin"
+    "-Dmount-path=${util-linux}/bin/mount"
+    "-Dumount-path=${util-linux}/bin/umount"
     "-Dcreate-log-dirs=false"
 
     # Use cgroupsv2. This is already the upstream default, but better be explicit.
@@ -326,12 +327,12 @@ stdenv.mkDerivation {
       test -e $i
       substituteInPlace $i \
         --replace /usr/bin/getent ${getent}/bin/getent \
-        --replace /sbin/mkswap ${lib.getBin utillinux}/sbin/mkswap \
-        --replace /sbin/swapon ${lib.getBin utillinux}/sbin/swapon \
-        --replace /sbin/swapoff ${lib.getBin utillinux}/sbin/swapoff \
+        --replace /sbin/mkswap ${lib.getBin util-linux}/sbin/mkswap \
+        --replace /sbin/swapon ${lib.getBin util-linux}/sbin/swapon \
+        --replace /sbin/swapoff ${lib.getBin util-linux}/sbin/swapoff \
         --replace /bin/echo ${coreutils}/bin/echo \
         --replace /bin/cat ${coreutils}/bin/cat \
-        --replace /sbin/sulogin ${lib.getBin utillinux}/sbin/sulogin \
+        --replace /sbin/sulogin ${lib.getBin util-linux}/sbin/sulogin \
         --replace /sbin/modprobe ${lib.getBin kmod}/sbin/modprobe \
         --replace /usr/lib/systemd/systemd-fsck $out/lib/systemd/systemd-fsck \
         --replace /bin/plymouth /run/current-system/sw/bin/plymouth # To avoid dependency