clan/checks: fix clanLib not checking

This commit is contained in:
Johannes Kirschbauer
2025-10-28 11:25:20 +01:00
parent 183817b769
commit b7508b2b43
4 changed files with 29 additions and 17 deletions

View File

@@ -39,21 +39,6 @@ in
}; };
modules = [ modules = [
clan-core.modules.clan.default clan-core.modules.clan.default
{
checks.minNixpkgsVersion = {
assertion = lib.versionAtLeast nixpkgs.lib.version "25.11";
message = ''
Nixpkgs version: ${nixpkgs.lib.version} is incompatible with clan-core. (>= 25.11 is recommended)
---
Your version of 'nixpkgs' seems too old for clan-core.
Please read: https://docs.clan.lol/guides/nixpkgs-flake-input
You can ignore this check by setting:
clan.checks.minNixpkgsVersion.ignore = true;
---
'';
};
}
]; ];
}; };
# Important: !This logic needs to be kept in sync with lib.clan function! # Important: !This logic needs to be kept in sync with lib.clan function!

View File

@@ -53,7 +53,12 @@ in
}; };
}; };
}).clan }).clan
{ config.directory = rootPath; }; {
directory = rootPath;
self = {
inputs.nixpkgs.lib.version = "25.11";
};
};
in in
{ {
inherit vclan; inherit vclan;
@@ -94,7 +99,12 @@ in
}; };
}; };
}).clan }).clan
{ config.directory = rootPath; }; {
directory = rootPath;
self = {
inputs.nixpkgs.lib.version = "25.11";
};
};
in in
{ {
inherit vclan; inherit vclan;

16
modules/clan/checks.nix Normal file
View File

@@ -0,0 +1,16 @@
{ lib, nixpkgs, ... }:
{
checks.minNixpkgsVersion = {
assertion = lib.versionAtLeast nixpkgs.lib.version "25.11";
message = ''
Nixpkgs version: ${nixpkgs.lib.version} is incompatible with clan-core. (>= 25.11 is recommended)
---
Your version of 'nixpkgs' seems too old for clan-core.
Please read: https://docs.clan.lol/guides/nixpkgs-flake-input
You can ignore this check by setting:
clan.checks.minNixpkgsVersion.ignore = true;
---
'';
};
}

View File

@@ -19,5 +19,6 @@
imports = [ imports = [
./top-level-interface.nix ./top-level-interface.nix
./module.nix ./module.nix
./checks.nix
]; ];
} }