Skip to content

Commit

Permalink
nixos/kresd: Fix unsupported regex
Browse files Browse the repository at this point in the history
Regex supported by `builtins.match` differ on Linux and Darwin
(see NixOS/nix#1537) and the empty match group errors on Darwin.
But simply removing it does not change the logic in the module in any
way.

(cherry picked from commit ab94ea6, PR #100592)
  • Loading branch information
griff authored and vcunat committed Apr 1, 2021
1 parent 0267cf5 commit c923a25
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nixos/modules/services/networking/kresd.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ let
mkListen = kind: addr: let
al_v4 = builtins.match "([0-9.]\+):([0-9]\+)" addr;
al_v6 = builtins.match "\\[(.\+)]:([0-9]\+)" addr;
al_portOnly = builtins.match "()([0-9]\+)" addr;
al_portOnly = builtins.match "([0-9]\+)" addr;
al = findFirst (a: a != null)
(throw "services.kresd.*: incorrect address specification '${addr}'")
[ al_v4 al_v6 al_portOnly ];
Expand Down

0 comments on commit c923a25

Please sign in to comment.