1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-18 03:30:45 +00:00

nixos/printing: Fix openFirewall option

This commit is contained in:
Jonas Heinrich 2023-11-07 10:21:48 +01:00
parent a845c1b2d6
commit 31f01ff179

View file

@ -109,11 +109,10 @@ let
getGutenprint = pkgs: head (filterGutenprint pkgs);
parsePorts = addresses: let
splitAddress = addr: lib.strings.splitString ":" addr;
extractPort = addr: builtins.elemAt (builtins.tail (splitAddress addr)) 0;
toInt = str: lib.strings.toInt str;
splitAddress = addr: strings.splitString ":" addr;
extractPort = addr: builtins.foldl' (a: b: b) "" (splitAddress addr);
in
builtins.map (address: toInt (extractPort address)) addresses;
builtins.map (address: strings.toInt (extractPort address)) addresses;
in