Skip to content

Commit

Permalink
Ignore patch file number in shouldOverride
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
henrirosten authored and brianmcgillion committed Mar 1, 2024
1 parent cfec51b commit 45ff320
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion overlays/custom-packages/systemd/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 45ff320

Please sign in to comment.