summary refs log tree commit diff
path: root/pkgs/os-specific/linux/systemd/default.nix
diff options
context:
space:
mode:
authorLily Foster <lily@lily.flowers>2023-03-30 11:40:35 -0400
committerLily Foster <lily@lily.flowers>2023-03-30 11:40:35 -0400
commit617813243c052e0b9e8ae57362de234523d61524 (patch)
treeb58d026c2104e0cea502494b8700c7a84308fd1b /pkgs/os-specific/linux/systemd/default.nix
parenta9bd908709826ef1d1319cb4001a8088e97ab5bb (diff)
downloadnixpkgs-617813243c052e0b9e8ae57362de234523d61524.tar
nixpkgs-617813243c052e0b9e8ae57362de234523d61524.tar.gz
nixpkgs-617813243c052e0b9e8ae57362de234523d61524.tar.bz2
nixpkgs-617813243c052e0b9e8ae57362de234523d61524.tar.lz
nixpkgs-617813243c052e0b9e8ae57362de234523d61524.tar.xz
nixpkgs-617813243c052e0b9e8ae57362de234523d61524.tar.zst
nixpkgs-617813243c052e0b9e8ae57362de234523d61524.zip
systemd: fix ukify script
The script requires a python3 shebang with an environment that includes
python3Packages.pefile at runtime.
Diffstat (limited to 'pkgs/os-specific/linux/systemd/default.nix')
-rw-r--r--pkgs/os-specific/linux/systemd/default.nix9
1 files changed, 5 insertions, 4 deletions
diff --git a/pkgs/os-specific/linux/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix
index 38052ed4768..2e129c1075f 100644
--- a/pkgs/os-specific/linux/systemd/default.nix
+++ b/pkgs/os-specific/linux/systemd/default.nix
@@ -117,6 +117,7 @@
 , withTimedated ? true
 , withTimesyncd ? true
 , withTpm2Tss ? true
+, withUkify ? false  # adds python to closure which is too much by default
 , withUserDb ? true
 , withUtmp ? !stdenv.hostPlatform.isMusl
   # tests assume too much system access for them to be feasible for us right now
@@ -349,7 +350,7 @@ stdenv.mkDerivation (finalAttrs: {
   # when cross-compiling.
   + ''
     shopt -s extglob
-    patchShebangs tools test src/!(rpm|kernel-install) src/kernel-install/test-kernel-install.sh
+    patchShebangs tools test src/!(rpm|kernel-install|ukify) src/kernel-install/test-kernel-install.sh
   '';
 
   outputs = [ "out" "man" "dev" ];
@@ -414,6 +415,7 @@ stdenv.mkDerivation (finalAttrs: {
     ++ lib.optionals (withHomed || withCryptsetup) [ libfido2 ]
     ++ lib.optionals withLibBPF [ libbpf ]
     ++ lib.optional withTpm2Tss tpm2-tss
+    ++ lib.optional withUkify (python3Packages.python.withPackages (ps: with ps; [ pefile ]))
   ;
 
   #dontAddPrefix = true;
@@ -510,11 +512,10 @@ stdenv.mkDerivation (finalAttrs: {
     # more frequent development builds
     "-Dman=true"
 
-    # Temporary disable the ukify tool. see https://github.com/NixOS/nixpkgs/pull/216826#issuecomment-1465228824
-    "-Dukify=false"
-
     "-Defi=${lib.boolToString withEfi}"
     "-Dgnu-efi=${lib.boolToString withEfi}"
+
+    "-Dukify=${lib.boolToString withUkify}"
   ] ++ lib.optionals withEfi [
     "-Defi-libdir=${toString gnu-efi}/lib"
     "-Defi-includedir=${toString gnu-efi}/include/efi"