diff options
Diffstat (limited to 'pkgs/tools/virtualization/mkosi/default.nix')
-rw-r--r-- | pkgs/tools/virtualization/mkosi/default.nix | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/pkgs/tools/virtualization/mkosi/default.nix b/pkgs/tools/virtualization/mkosi/default.nix index 8737002c0a82f..4514280f7757a 100644 --- a/pkgs/tools/virtualization/mkosi/default.nix +++ b/pkgs/tools/virtualization/mkosi/default.nix @@ -1,6 +1,5 @@ { lib , fetchFromGitHub -, fetchpatch , stdenv , python3 , bubblewrap @@ -25,7 +24,6 @@ # Optional dependencies , withQemu ? false , qemu -, OVMF }: let # For systemd features used by mkosi, see @@ -37,6 +35,7 @@ let withFirstboot = true; withEfi = true; withUkify = true; + withKernelInstall = true; }; python3pefile = python3.withPackages (ps: with ps; [ @@ -45,7 +44,7 @@ let in buildPythonApplication rec { pname = "mkosi"; - version = "20.2"; + version = "22"; format = "pyproject"; outputs = [ "out" "man" ]; @@ -54,29 +53,19 @@ buildPythonApplication rec { owner = "systemd"; repo = "mkosi"; rev = "v${version}"; - hash = "sha256-+mvepzoswDVIHzj+rEnlr0ouphGv5unpaNX3U8x517Y="; + hash = "sha256-Zom1GlyhqgpTKfjcBOUEJMlubSn+TQsk97js1/UfDHY="; }; - patches = [ - # sandbox: Deal correctly with unmerged-usr. - # Remove on next release after v20.2. - (fetchpatch { - url = "https://github.com/systemd/mkosi/commit/5a708efdb432dee9c6e5a9a4754752359cac8944.patch"; - hash = "sha256-dXkY8Hha6y9CoZC1WdtZuI/YJsOQ1fOt4o4RsPkGWYQ="; - }) - ]; - # Fix ctypes finding library # https://github.com/NixOS/nixpkgs/issues/7307 postPatch = lib.optionalString stdenv.isLinux '' - substituteInPlace mkosi/run.py \ - --replace 'ctypes.util.find_library("c")' "'${stdenv.cc.libc}/lib/libc.so.6'" + substituteInPlace mkosi/user.py \ + --replace-fail 'ctypes.util.find_library("c")' "'${stdenv.cc.libc}/lib/libc.so.6'" substituteInPlace mkosi/__init__.py \ - --replace '/usr/lib/systemd/ukify' "${systemdForMkosi}/lib/systemd/ukify" + --replace-fail '/usr/lib/systemd/ukify' "${systemdForMkosi}/lib/systemd/ukify" '' + lib.optionalString withQemu '' substituteInPlace mkosi/qemu.py \ - --replace '/usr/share/ovmf/x64/OVMF_VARS.fd' "${OVMF.variables}" \ - --replace '/usr/share/ovmf/x64/OVMF_CODE.fd' "${OVMF.firmware}" + --replace-fail "usr/share/qemu/firmware" "${qemu}/share/qemu/firmware" ''; nativeBuildInputs = [ @@ -130,5 +119,7 @@ buildPythonApplication rec { mainProgram = "mkosi"; maintainers = with maintainers; [ malt3 katexochen ]; platforms = platforms.linux; + # `mkosi qemu` boot fails in the uefi shell, image isn't found. + broken = withQemu; }; } |