From 2213bc070c67753bfee08241b6e934b6b78d4033 Mon Sep 17 00:00:00 2001 From: emilylange Date: Wed, 15 Jul 2026 18:30:46 +0200 Subject: [PATCH] chromium: remove warnObsoleteVersionConditional It's been 5 years[^1] since this feature has been added and 1 year[^2] since it has been muted by default. I don't think we need this anymore. This rather simple implementation has some deficiencies with more complex conditionals, and it is also just surprisingly easy to run into infinite recursions caused by it. And while I can only really speculate what the motivation behind its addition was, the maintainer situation has drastically changed since then, and it's just not that useful anymore. [^1]: eb335f697eb7fd4e8f10e6d3ec1467a2e7dc0ead [^2]: 8f16c0955ec3918f2b68ec9081633952e9155a5c --- .../networking/browsers/chromium/default.nix | 25 +++---------------- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/pkgs/applications/networking/browsers/chromium/default.nix b/pkgs/applications/networking/browsers/chromium/default.nix index 3c058a84ed64..6071ae2f850b 100644 --- a/pkgs/applications/networking/browsers/chromium/default.nix +++ b/pkgs/applications/networking/browsers/chromium/default.nix @@ -22,7 +22,6 @@ lib, libkrb5, widevine-cdm, - electron-source, # for warnObsoleteVersionConditional # package customization # Note: enable* flags should not require full rebuilds (i.e. only affect the wrapper) @@ -42,29 +41,11 @@ let stdenv = pkgs.rustc.llvmPackages.stdenv; # Helper functions for changes that depend on specific versions: - warnObsoleteVersionConditional = - 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 (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 = - min-version: - let - result = lib.versionAtLeast upstream-info.version min-version; - in - warnObsoleteVersionConditional min-version result; + chromiumVersionAtLeast = min-version: lib.versionAtLeast upstream-info.version min-version; versionRange = min-version: upto-version: - let - inherit (upstream-info) version; - result = lib.versionAtLeast version min-version && lib.versionOlder version upto-version; - in - warnObsoleteVersionConditional upto-version result; + lib.versionAtLeast upstream-info.version min-version + && lib.versionOlder upstream-info.version upto-version; callPackage = newScope chromium;