We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent afd74b6 commit f21ab27Copy full SHA for f21ab27
1 file changed
mkDevShell/options.nix
@@ -4,8 +4,9 @@ let
4
resolveKey = key:
5
let
6
attrs = builtins.filter builtins.isString (builtins.split "\\." key);
7
+ op = sum: attr: sum.${attr} or (throw "package \"${key}\" not found");
8
in
- builtins.foldl' (sum: attr: sum.${attr}) pkgs attrs
9
+ builtins.foldl' op pkgs attrs
10
;
11
12
pad = str: num:
@@ -48,7 +49,7 @@ let
48
49
50
opCat = { name, value }:
51
- opCmd = { name, help, ...}:
52
+ opCmd = { name, help, ... }:
53
54
len = maxCommandLength - (builtins.stringLength name);
55
@@ -57,7 +58,7 @@ let
57
58
else
59
"${pad name len} - ${help}";
60
- "\n[${name}]\n" + builtins.concatStringsSep "\n" (map opCmd value);
61
+ "\n[${name}]\n" + builtins.concatStringsSep "\n" (map opCmd value);
62
63
builtins.concatStringsSep "\n" (map opCat commandByCategoriesSorted)
64
0 commit comments