mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-20 16:15:43 +02:00
lib.version: add correctNixpkgsChannel
This commit is contained in:
parent
8f782c7af9
commit
ebd4ba4f79
1 changed files with 16 additions and 0 deletions
|
@ -121,4 +121,20 @@ in
|
|||
inherit (lib.nixvim.version) release;
|
||||
in
|
||||
if release == "unstable" then "main" else "nixos-" + release;
|
||||
|
||||
/**
|
||||
Whether the nixpkgs input is correct for this release of nixvim.
|
||||
|
||||
Can be used to identify mismatched nixpkgs inputs, usually caused our input
|
||||
following a user's input from another channel
|
||||
*/
|
||||
correctNixpkgsChannel =
|
||||
let
|
||||
nixvimRelease = lib.nixvim.version.release;
|
||||
nixpkgsRelease = lib.trivial.release;
|
||||
in
|
||||
if nixvimRelease == "unstable" then
|
||||
true # TODO: how do we know what channel a nixpkgs instance is on?
|
||||
else
|
||||
nixvimRelease == nixpkgsRelease;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue