Unverified Commit 8f16c095 authored by emilylange's avatar emilylange
Browse files

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.
parent d81c84d2
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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 =