summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/default.nix8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/default.nix b/lib/default.nix
index 64b2d48a..347830e8 100644
--- a/lib/default.nix
+++ b/lib/default.nix
@@ -93,7 +93,13 @@ let
in
if max.pos == 0
then a
- else "${concatStringsSep ":" lhs}::${concatStringsSep ":" rhs}";
+ else let
+ sep =
+ if 8 - (length lhs + length rhs) == 1
+ then ":0:"
+ else "::";
+ in
+ "${concatStringsSep ":" lhs}${sep}${concatStringsSep ":" rhs}";
drop-leading-zeros =
let