From 543bc5cf6bc05995180b21117c3dc6ebcebb207a Mon Sep 17 00:00:00 2001 From: K900 Date: Wed, 14 Jan 2026 18:09:13 +0300 Subject: [PATCH] package: more specific warning conditions Avoids warning spam if overridden with nixos-unstable as an input. Change-Id: I7cc4da757371c582366bc13adcbce742e312b5c7 --- package.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/package.nix b/package.nix index b65b1a02b..14c2c8449 100644 --- a/package.nix +++ b/package.nix @@ -356,8 +356,14 @@ stdenv.mkDerivation (finalAttrs: { ] ++ [ (lib.getBin lowdown-unsandboxed) - (lib.warnIf (lib.versionAtLeast mdbook.version "0.5.0") - "Workarounds for mdbook 0.4.x/0.5.x interoperability can be removed when 0.5.0 or above is in nixpkgs-stable" + (lib.warnIf + ( + # if mdbook 0.5 is backported to 25.11 + (lib.trivial.release == "25.11" && lib.versionAtLeast mdbook.version "0.5.0") + # or 25.11 is EOL + || (lib.trivial.oldestSupportedRelease > 2511) + ) + "Workarounds for mdbook 0.4.x/0.5.x interoperability can be removed as 0.5.0 is in nixpkgs-stable" mdbook ) mdbook-linkcheck