mkosi: use --replace-fail on substituteInPlace

This commit is contained in:
Paul Meyer 2024-03-19 06:37:15 +00:00
parent 5a07560443
commit c93b55dba5

View File

@ -60,12 +60,12 @@ buildPythonApplication rec {
# https://github.com/NixOS/nixpkgs/issues/7307
postPatch = lib.optionalString stdenv.isLinux ''
substituteInPlace mkosi/user.py \
--replace 'ctypes.util.find_library("c")' "'${stdenv.cc.libc}/lib/libc.so.6'"
--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/qemu/firmware" "${qemu}/share/qemu/firmware"
--replace-fail "usr/share/qemu/firmware" "${qemu}/share/qemu/firmware"
'';
nativeBuildInputs = [