diff options
author | lassulus <lassulus@lassul.us> | 2018-12-11 23:03:37 +0100 |
---|---|---|
committer | lassulus <lassulus@lassul.us> | 2018-12-11 23:03:37 +0100 |
commit | ae7a4661ea34d92616a502ff5d0171812d4d0341 (patch) | |
tree | 0214cd425f34248bd6cf0ca288c810c8bd9e2461 /lib/default.nix | |
parent | 60b65d17b9a8b83d7d54f1de526c8c436f6913d0 (diff) | |
parent | cee44811cdc5fbc0d46efd96439885065627aa1a (diff) |
Merge remote-tracking branch 'ni/master'
Diffstat (limited to 'lib/default.nix')
-rw-r--r-- | lib/default.nix | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/default.nix b/lib/default.nix index bf8c65e21..e352c7be9 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -29,8 +29,6 @@ let listToAttrs (map (name: nameValuePair name set.${name}) (filter (flip hasAttr set) names)); - setAttr = name: value: set: set // { ${name} = value; }; - test = re: x: isString x && testString re x; testString = re: x: match re x != null; @@ -109,7 +107,11 @@ let in a: concatStringsSep ":" (map f (splitString ":" a)); in - a: toLower (group-zeros (drop-leading-zeros a)); + a: + toLower + (if test ".*::.*" a + then a + else group-zeros (drop-leading-zeros a)); }; in |