Commit c2b411e6 authored by Robert Hensing's avatar Robert Hensing
Browse files

lib.oldestSupportedReleaseIsAtLeast: rename from bad name and deprecate after 24.11

It seems impossible to describe this condition more concisely without making
it incomprehensible.
parent 2d11924c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -73,7 +73,7 @@ let
    inherit (self.trivial) id const pipe concat or and xor bitAnd bitOr bitXor
      bitNot boolToString mergeAttrs flip mapNullable inNixShell isFloat min max
      importJSON importTOML warn warnIf warnIfNot throwIf throwIfNot checkListOfEnum
      info showWarnings nixpkgsVersion version isInOldestRelease
      info showWarnings nixpkgsVersion version isInOldestRelease oldestSupportedReleaseIsAtLeast
      mod compare splitByAndCompare seq deepSeq lessThan add sub
      functionArgs setFunctionArgs isFunction toFunction mirrorFunctionArgs
      fromHexString toHexString toBaseDigits inPureEvalMode isBool isInt pathExists
+9 −0
Original line number Diff line number Diff line
@@ -397,6 +397,15 @@ in {
    Set it to the upcoming release, matching the nixpkgs/.version file.
  */
  isInOldestRelease =
    lib.warnIf (lib.oldestSupportedReleaseIsAtLeast 2411)
      "lib.isInOldestRelease is deprecated. Use lib.oldestSupportedReleaseIsAtLeast instead."
    lib.oldestSupportedReleaseIsAtLeast;

  /**
    Alias for `isInOldestRelease` introduced in 24.11.
    Use `isInOldestRelease` in expressions outside of Nixpkgs for greater compatibility.
   */
  oldestSupportedReleaseIsAtLeast =
    release:
      release <= lib.trivial.oldestSupportedRelease;