Skip to content

Commit e57d662

Browse files
committed
caddy: avoid use of builtins and prefer lib
There is no `lib.hashString`, so keep using `builtins` for this one.
1 parent 4642e27 commit e57d662

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pkgs/by-name/ca/caddy/plugins.nix

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@
1212
hash ? lib.fakeHash,
1313
}:
1414
let
15-
pluginsSorted = builtins.sort builtins.lessThan plugins;
15+
pluginsSorted = lib.sort lib.lessThan plugins;
1616
pluginsList = lib.concatMapStrings (plugin: "${plugin}-") pluginsSorted;
1717
pluginsHash = builtins.hashString "md5" pluginsList;
18-
pluginsWithoutVersion = builtins.filter (p: !lib.hasInfix "@" p) pluginsSorted;
18+
pluginsWithoutVersion = lib.filter (p: !lib.hasInfix "@" p) pluginsSorted;
1919
in
2020
assert lib.assertMsg (
21-
builtins.length pluginsWithoutVersion == 0
22-
) "All plugins should have a version (eg ${builtins.elemAt pluginsWithoutVersion 0}@x.y.z)!";
21+
lib.length pluginsWithoutVersion == 0
22+
) "All plugins should have a version (eg ${lib.elemAt pluginsWithoutVersion 0}@x.y.z)!";
2323
caddy.overrideAttrs (
2424
finalAttrs: prevAttrs: {
2525
vendorHash = null;

0 commit comments

Comments
 (0)