chromium: make warnObsoleteVersionConditional conditional

Prior to this, an obsolete version conditional would trigger an eval
warning telling you that it can be safely removed now.

In an attempt to make electron-source EOL removals a bit easier for the
electron maintainers, mute those warnings by default. This way, electron
maintainers can remove their EOL version on their own and aren't
required to also touch the chromium derivation for cleanup.

Chromium maintainers (or anyone, really) are able to opt-into those
warnings by changing the value of enabled to true locally and act
accordingly.

Hope this clears a hurdle for the electron maintainers.
This commit is contained in:
emilylange
2025-04-10 16:16:58 +02:00
parent d81c84d217
commit 8f16c0955e
@@ -46,8 +46,10 @@ let
min-version: result:
let
min-supported-version = (lib.head (lib.attrValues electron-source)).unwrapped.info.chromium.version;
# Warning can be toggled by changing the value of enabled:
enabled = false;
in
lib.warnIf (lib.versionAtLeast min-supported-version min-version)
lib.warnIf (enabled && lib.versionAtLeast min-supported-version min-version)
"chromium: min-supported-version ${min-supported-version} is newer than a conditional bounded at ${min-version}. You can safely delete it."
result;
chromiumVersionAtLeast =