From 8f16c0955ec3918f2b68ec9081633952e9155a5c Mon Sep 17 00:00:00 2001 From: emilylange Date: Thu, 10 Apr 2025 16:16:58 +0200 Subject: [PATCH] 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. --- pkgs/applications/networking/browsers/chromium/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/networking/browsers/chromium/default.nix b/pkgs/applications/networking/browsers/chromium/default.nix index b31c31a7b829..d8c3cf2e3780 100644 --- a/pkgs/applications/networking/browsers/chromium/default.nix +++ b/pkgs/applications/networking/browsers/chromium/default.nix @@ -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 =