diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/default.nix | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/default.nix b/lib/default.nix index 64b2d48ab..347830e8c 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 |