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 { lib
, fetchFromGitHub , fetchFromGitHub
, python3
, setuptools , setuptools
, setuptools-scm , setuptools-scm
, wheel , wheel
, buildPythonApplication , buildPythonApplication
, pytestCheckHook , pytestCheckHook
, pefile
, bubblewrap , bubblewrap
, systemd , systemd
, stdenv , stdenv
@ -19,6 +21,10 @@ let
withEfi = true; withEfi = true;
withUkify = true; withUkify = true;
}; };
python3pefile = python3.withPackages (ps: with ps; [
pefile
]);
in in
buildPythonApplication rec { buildPythonApplication rec {
pname = "mkosi"; pname = "mkosi";
@ -49,6 +55,10 @@ buildPythonApplication rec {
wheel wheel
]; ];
makeWrapperArgs = [
"--set MKOSI_INTERPRETER ${python3pefile}/bin/python3"
];
propagatedBuildInputs = [ propagatedBuildInputs = [
systemdForMkosi systemdForMkosi
bubblewrap bubblewrap