Merge pull request #297122 from katexochen/mkosi/22

mkosi: 20.2 -> 22; use --replace-fail on substituteInPlace

authored by Paul Meyer and committed by GitHub 6d418318 dd1290b0

+14 -20
+5 -3
nixos/doc/manual/release-notes/rl-2405.section.md
··· 321 321 - Proxies are now defined with a new option `settings.proxies` which takes a list of proxies. 322 322 - Consult the [upstream documentation](https://github.com/fatedier/frp#example-usage) for more details on the changes. 323 323 324 - - `mkosi` was updated to v20. Parts of the user interface have changed. Consult the 325 - release notes of [v19](https://github.com/systemd/mkosi/releases/tag/v19) and 326 - [v20](https://github.com/systemd/mkosi/releases/tag/v20) for a list of changes. 324 + - `mkosi` was updated to v22. Parts of the user interface have changed. Consult the 325 + release notes of [v19](https://github.com/systemd/mkosi/releases/tag/v19), 326 + [v20](https://github.com/systemd/mkosi/releases/tag/v20), 327 + [v21](https://github.com/systemd/mkosi/releases/tag/v21) and 328 + [v22](https://github.com/systemd/mkosi/releases/tag/v22) for a list of changes. 327 329 328 330 - `gonic` has been updated to v0.16.4. Config now requires `playlists-path` to be set. See the rest of the [v0.16.0 release notes](https://github.com/sentriz/gonic/releases/tag/v0.16.0) for more details. 329 331
+9 -17
pkgs/tools/virtualization/mkosi/default.nix
··· 25 25 # Optional dependencies 26 26 , withQemu ? false 27 27 , qemu 28 - , OVMF 29 28 }: 30 29 let 31 30 # For systemd features used by mkosi, see ··· 37 36 withFirstboot = true; 38 37 withEfi = true; 39 38 withUkify = true; 39 + withKernelInstall = true; 40 40 }; 41 41 42 42 python3pefile = python3.withPackages (ps: with ps; [ ··· 45 45 in 46 46 buildPythonApplication rec { 47 47 pname = "mkosi"; 48 - version = "20.2"; 48 + version = "22"; 49 49 format = "pyproject"; 50 50 51 51 outputs = [ "out" "man" ]; ··· 54 54 owner = "systemd"; 55 55 repo = "mkosi"; 56 56 rev = "v${version}"; 57 - hash = "sha256-+mvepzoswDVIHzj+rEnlr0ouphGv5unpaNX3U8x517Y="; 57 + hash = "sha256-Zom1GlyhqgpTKfjcBOUEJMlubSn+TQsk97js1/UfDHY="; 58 58 }; 59 59 60 - patches = [ 61 - # sandbox: Deal correctly with unmerged-usr. 62 - # Remove on next release after v20.2. 63 - (fetchpatch { 64 - url = "https://github.com/systemd/mkosi/commit/5a708efdb432dee9c6e5a9a4754752359cac8944.patch"; 65 - hash = "sha256-dXkY8Hha6y9CoZC1WdtZuI/YJsOQ1fOt4o4RsPkGWYQ="; 66 - }) 67 - ]; 68 - 69 60 # Fix ctypes finding library 70 61 # https://github.com/NixOS/nixpkgs/issues/7307 71 62 postPatch = lib.optionalString stdenv.isLinux '' 72 - substituteInPlace mkosi/run.py \ 73 - --replace 'ctypes.util.find_library("c")' "'${stdenv.cc.libc}/lib/libc.so.6'" 63 + substituteInPlace mkosi/user.py \ 64 + --replace-fail 'ctypes.util.find_library("c")' "'${stdenv.cc.libc}/lib/libc.so.6'" 74 65 substituteInPlace mkosi/__init__.py \ 75 - --replace '/usr/lib/systemd/ukify' "${systemdForMkosi}/lib/systemd/ukify" 66 + --replace-fail '/usr/lib/systemd/ukify' "${systemdForMkosi}/lib/systemd/ukify" 76 67 '' + lib.optionalString withQemu '' 77 68 substituteInPlace mkosi/qemu.py \ 78 - --replace '/usr/share/ovmf/x64/OVMF_VARS.fd' "${OVMF.variables}" \ 79 - --replace '/usr/share/ovmf/x64/OVMF_CODE.fd' "${OVMF.firmware}" 69 + --replace-fail "usr/share/qemu/firmware" "${qemu}/share/qemu/firmware" 80 70 ''; 81 71 82 72 nativeBuildInputs = [ ··· 130 120 mainProgram = "mkosi"; 131 121 maintainers = with maintainers; [ malt3 katexochen ]; 132 122 platforms = platforms.linux; 123 + # `mkosi qemu` boot fails in the uefi shell, image isn't found. 124 + broken = withQemu; 133 125 }; 134 126 }