summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorPaul Meyer <49727155+katexochen@users.noreply.github.com>2023-08-21 16:40:04 +0200
committerPaul Meyer <49727155+katexochen@users.noreply.github.com>2023-09-28 14:40:53 +0200
commitc19e5ee3015637c3d40a427593baf9931455017c (patch)
tree08b75f0a1840a2969c108c4dc71c8d532405a340 /pkgs
parent49942168e2b0f9734dd96ce7f1524cfb338f8ebd (diff)
downloadnixpkgs-c19e5ee3015637c3d40a427593baf9931455017c.tar
nixpkgs-c19e5ee3015637c3d40a427593baf9931455017c.tar.gz
nixpkgs-c19e5ee3015637c3d40a427593baf9931455017c.tar.bz2
nixpkgs-c19e5ee3015637c3d40a427593baf9931455017c.tar.lz
nixpkgs-c19e5ee3015637c3d40a427593baf9931455017c.tar.xz
nixpkgs-c19e5ee3015637c3d40a427593baf9931455017c.tar.zst
nixpkgs-c19e5ee3015637c3d40a427593baf9931455017c.zip
mkosi: fix missing pefile dependency
When building a bootable image, mkosi will invoke python with a script
that import pefile. We therefor add a python interpreter with the
needed module and pass it over the intended env var.

Co-authored-by: Malte Poll <mp@edgeless.systems>
Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/tools/virtualization/mkosi/default.nix10
1 files changed, 10 insertions, 0 deletions
diff --git a/pkgs/tools/virtualization/mkosi/default.nix b/pkgs/tools/virtualization/mkosi/default.nix
index 69c9462c63d..608d60387f5 100644
--- a/pkgs/tools/virtualization/mkosi/default.nix
+++ b/pkgs/tools/virtualization/mkosi/default.nix
@@ -1,10 +1,12 @@
 { lib
 , fetchFromGitHub
+, python3
 , setuptools
 , setuptools-scm
 , wheel
 , buildPythonApplication
 , pytestCheckHook
+, pefile
 , bubblewrap
 , systemd
 , stdenv
@@ -19,6 +21,10 @@ let
     withEfi = true;
     withUkify = true;
   };
+
+  python3pefile = python3.withPackages (ps: with ps; [
+    pefile
+  ]);
 in
 buildPythonApplication rec {
   pname = "mkosi";
@@ -49,6 +55,10 @@ buildPythonApplication rec {
     wheel
   ];
 
+  makeWrapperArgs = [
+    "--set MKOSI_INTERPRETER ${python3pefile}/bin/python3"
+  ];
+
   propagatedBuildInputs = [
     systemdForMkosi
     bubblewrap