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>
This commit is contained in:
Paul Meyer 2023-08-21 16:40:04 +02:00
parent 49942168e2
commit c19e5ee301

View File

@ -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