mirror of
https://github.com/nix-community/disko.git
synced 2026-12-01 13:33:28 +01:00
Merge pull request #906 from nix-community/fix-904
make-disk-image: Compare against correct nixpkgs version
This commit is contained in:
3 files changed
+5
-4
No files matched your search
+3
-2
@@ -361,10 +361,11 @@ let
|
|||||||
/* Checks whether nixpkgs is recent enough for vmTools to support the customQemu argument.
|
/* Checks whether nixpkgs is recent enough for vmTools to support the customQemu argument.
|
||||||
|
|
||||||
Returns false, which is technically incorrect, for a few commits on 2024-07-08, but we can't be more accurate.
|
Returns false, which is technically incorrect, for a few commits on 2024-07-08, but we can't be more accurate.
|
||||||
|
Make sure to pass lib, not pkgs.lib! See https://github.com/nix-community/disko/issues/904
|
||||||
|
|
||||||
vmToolsSupportsCustomQemu :: pkgs -> bool
|
vmToolsSupportsCustomQemu :: final_lib -> bool
|
||||||
*/
|
*/
|
||||||
vmToolsSupportsCustomQemu = pkgs: lib.versionAtLeast pkgs.lib.version "24.11.20240709";
|
vmToolsSupportsCustomQemu = final_lib: lib.versionAtLeast final_lib.version "24.11.20240709";
|
||||||
|
|
||||||
optionTypes = rec {
|
optionTypes = rec {
|
||||||
filename = lib.mkOptionType {
|
filename = lib.mkOptionType {
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ let
|
|||||||
(with cfg.kernelPackages; [ kernel ]
|
(with cfg.kernelPackages; [ kernel ]
|
||||||
++ lib.optional (lib.elem "zfs" cfg.extraRootModules || configSupportsZfs) zfs);
|
++ lib.optional (lib.elem "zfs" cfg.extraRootModules || configSupportsZfs) zfs);
|
||||||
}
|
}
|
||||||
// lib.optionalAttrs (diskoLib.vmToolsSupportsCustomQemu pkgs)
|
// lib.optionalAttrs (diskoLib.vmToolsSupportsCustomQemu lib)
|
||||||
{
|
{
|
||||||
customQemu = cfg.qemu;
|
customQemu = cfg.qemu;
|
||||||
};
|
};
|
||||||
|
|||||||
+1
-1
@@ -213,7 +213,7 @@ in
|
|||||||
config = {
|
config = {
|
||||||
assertions = [
|
assertions = [
|
||||||
{
|
{
|
||||||
assertion = config.disko.imageBuilder.qemu != null -> diskoLib.vmToolsSupportsCustomQemu pkgs;
|
assertion = config.disko.imageBuilder.qemu != null -> diskoLib.vmToolsSupportsCustomQemu lib;
|
||||||
message = ''
|
message = ''
|
||||||
You have set config.disko.imageBuild.qemu, but vmTools in your nixpkgs version "${lib.version}"
|
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.
|
does not support overriding the qemu package with the customQemu option yet.
|
||||||
|
|||||||
Reference in new issue
Block a user