From 45ff3205bdbe1b74ab7d070367041944956bc583 Mon Sep 17 00:00:00 2001 From: Henri Rosten Date: Fri, 1 Mar 2024 08:26:04 +0200 Subject: [PATCH] Ignore patch file number in shouldOverride On checking if the systemd timesyncd patch is applied nixpkgs upstream, do not require a match on the sequential patch file number. Patches can be applied on different order, or the total number of patches might change over time, so it's incorrect to assume the timesyncd patch would always have the sequential order of '0020'. Signed-off-by: Henri Rosten --- overlays/custom-packages/systemd/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/overlays/custom-packages/systemd/default.nix b/overlays/custom-packages/systemd/default.nix index 2fd1b6ef3..2cb651476 100644 --- a/overlays/custom-packages/systemd/default.nix +++ b/overlays/custom-packages/systemd/default.nix @@ -6,7 +6,7 @@ # the patch is already present. # # https://github.com/NixOS/nixpkgs/pull/239201 - shouldOverride = !(final.lib.lists.any (p: final.lib.strings.hasSuffix "0020-timesyncd-disable-NSCD-when-DNSSEC-validation-is-dis.patch" (toString p)) prev.systemd.patches); + shouldOverride = !(final.lib.lists.any (p: final.lib.strings.hasSuffix "timesyncd-disable-NSCD-when-DNSSEC-validation-is-dis.patch" (toString p)) prev.systemd.patches); in prev.systemd.overrideAttrs (prevAttrs: final.lib.optionalAttrs shouldOverride {