libguestfs-with-appliance: warn in case of version mismatch

This commit is contained in:
lukts30 2024-10-17 21:31:12 +02:00 committed by Bjørn Forsman
parent 36b4d9dbb8
commit 7886f6e5f1

View File

@ -1,3 +1,12 @@
{ libguestfs, libguestfs-appliance }:
{
lib,
libguestfs,
libguestfs-appliance,
}:
libguestfs.override { appliance = libguestfs-appliance; }
# https://github.com/NixOS/nixpkgs/issues/280881
lib.warnIf (builtins.compareVersions libguestfs.version libguestfs-appliance.version > 0)
"libguestfs has a higher version than libguestfs-appliance (${libguestfs.version} > ${libguestfs-appliance.version}), runtime errors may occur!"
libguestfs.override
{ appliance = libguestfs-appliance; }