make-disk-image: Compare against correct nixpkgs version

It seems that there is a difference between how `pkgs` and `lib` get
passed to NixOS modules: `pkgs` is the unmodified original, `lib` is the
final version after overrides etc.

This causes `pkgs.lib.version` to be `24.11git` in some cases, while
`lib.version` is `24.11.20241123.0c58267`.
Maybe this can be fixed in nixpkgs? Either way, this change fixes that
issue.

Fixes #904
This commit is contained in:
Felix Uhl
2024-11-29 19:38:31 +01:00
parent 341482e2f4
commit 5655a13ac9
3 changed files with 5 additions and 4 deletions

View File

@@ -213,7 +213,7 @@ in
config = {
assertions = [
{
assertion = config.disko.imageBuilder.qemu != null -> diskoLib.vmToolsSupportsCustomQemu pkgs;
assertion = config.disko.imageBuilder.qemu != null -> diskoLib.vmToolsSupportsCustomQemu lib;
message = ''
You have set config.disko.imageBuild.qemu, but vmTools in your nixpkgs version "${lib.version}"
does not support overriding the qemu package with the customQemu option yet.