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]: eb335f697e
[^2]: 8f16c0955e
This commit is contained in:
emilylange
2026-07-15 18:30:46 +02:00
parent 74444fb4e5
commit 2213bc070c
@@ -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;