diff options
author | Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi> | 2017-09-14 01:03:39 +0300 |
---|---|---|
committer | Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi> | 2017-09-14 01:03:39 +0300 |
commit | 0c368ef02f40fdc01641959be0d6a3ee8c1df5ff (patch) | |
tree | c7e627a2c03f1d6d403dab501254ba8cf548b559 | |
parent | 62711f426536c2a1e2b80947fa352a0f8a5a127f (diff) |
treewide: Escape backslash in strings properly
"\." is apparently the same as "." wheras the correct one is "\\."
-rw-r--r-- | nixos/modules/services/misc/geoip-updater.nix | 4 | ||||
-rw-r--r-- | pkgs/development/idris-modules/default.nix | 2 | ||||
-rw-r--r-- | pkgs/top-level/impure.nix | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/nixos/modules/services/misc/geoip-updater.nix b/nixos/modules/services/misc/geoip-updater.nix index 5135fac8f7dce..760fa66e80d6c 100644 --- a/nixos/modules/services/misc/geoip-updater.nix +++ b/nixos/modules/services/misc/geoip-updater.nix @@ -238,7 +238,7 @@ in assertions = [ { assertion = (builtins.filter - (x: builtins.match ".*\.(gz|xz)$" x == null) cfg.databases) == []; + (x: builtins.match ".*\\.(gz|xz)$" x == null) cfg.databases) == []; message = '' services.geoip-updater.databases supports only .gz and .xz databases. @@ -246,7 +246,7 @@ in ${toString cfg.databases} Offending element(s): - ${toString (builtins.filter (x: builtins.match ".*\.(gz|xz)$" x == null) cfg.databases)}; + ${toString (builtins.filter (x: builtins.match ".*\\.(gz|xz)$" x == null) cfg.databases)}; ''; } ]; diff --git a/pkgs/development/idris-modules/default.nix b/pkgs/development/idris-modules/default.nix index 3d0ea511e1017..4d7c4928283af 100644 --- a/pkgs/development/idris-modules/default.nix +++ b/pkgs/development/idris-modules/default.nix @@ -26,7 +26,7 @@ }; files = builtins.filter (n: n != "default") (pkgs.lib.mapAttrsToList (name: type: let - m = builtins.match "(.*)\.nix" name; + m = builtins.match "(.*)\\.nix" name; in if m == null then "default" else builtins.head m) (builtins.readDir ./.)); in (builtins.listToAttrs (map (name: { inherit name; diff --git a/pkgs/top-level/impure.nix b/pkgs/top-level/impure.nix index a4d313a1b9916..a9f21e45aed4d 100644 --- a/pkgs/top-level/impure.nix +++ b/pkgs/top-level/impure.nix @@ -50,7 +50,7 @@ in # it's a directory, so the set of overlays from the directory, ordered lexicographically let content = readDir path; in map (n: import (path + ("/" + n))) - (builtins.filter (n: builtins.match ".*\.nix" n != null || pathExists (path + ("/" + n + "/default.nix"))) + (builtins.filter (n: builtins.match ".*\\.nix" n != null || pathExists (path + ("/" + n + "/default.nix"))) (attrNames content)) else # it's a file, so the result is the contents of the file itself |