Merge pull request #297122 from katexochen/mkosi/22

mkosi: 20.2 -> 22; use --replace-fail on substituteInPlace
This commit is contained in:
Paul Meyer 2024-05-06 09:39:51 +02:00 committed by GitHub
commit 6d41831819
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 14 additions and 20 deletions

View file

@ -321,9 +321,11 @@ The pre-existing [services.ankisyncd](#opt-services.ankisyncd.enable) has been m
- Proxies are now defined with a new option `settings.proxies` which takes a list of proxies.
- Consult the [upstream documentation](https://github.com/fatedier/frp#example-usage) for more details on the changes.
- `mkosi` was updated to v20. Parts of the user interface have changed. Consult the
release notes of [v19](https://github.com/systemd/mkosi/releases/tag/v19) and
[v20](https://github.com/systemd/mkosi/releases/tag/v20) for a list of changes.
- `mkosi` was updated to v22. Parts of the user interface have changed. Consult the
release notes of [v19](https://github.com/systemd/mkosi/releases/tag/v19),
[v20](https://github.com/systemd/mkosi/releases/tag/v20),
[v21](https://github.com/systemd/mkosi/releases/tag/v21) and
[v22](https://github.com/systemd/mkosi/releases/tag/v22) for a list of changes.
- `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.

View file

@ -25,7 +25,6 @@
# Optional dependencies
, withQemu ? false
, qemu
, OVMF
}:
let
# For systemd features used by mkosi, see
@ -37,6 +36,7 @@ let
withFirstboot = true;
withEfi = true;
withUkify = true;
withKernelInstall = true;
};
python3pefile = python3.withPackages (ps: with ps; [
@ -45,7 +45,7 @@ let
in
buildPythonApplication rec {
pname = "mkosi";
version = "20.2";
version = "22";
format = "pyproject";
outputs = [ "out" "man" ];
@ -54,29 +54,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 +120,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;
};
}