Loading lib/strings.nix +2 −1 Original line number Diff line number Diff line Loading @@ -337,6 +337,7 @@ rec { /** Concatenate a list of strings, adding a newline at the end of each one. Defined as `concatMapStrings (s: s + "\n")`. # Inputs Loading @@ -360,7 +361,7 @@ rec { ::: */ concatLines = str: concatStringsSep "\n" str + "\n"; concatLines = concatMapStrings (s: s + "\n"); /** Given string `s`, replace every occurrence of the string `from` with the string `to`. Loading lib/tests/misc.nix +4 −0 Original line number Diff line number Diff line Loading @@ -559,6 +559,10 @@ runTests { ]; expected = "a\nb\nc\n"; }; testConcatLinesEmpty = { expr = concatLines [ ]; expected = ""; }; testMakeIncludePathWithPkgs = { expr = ( Loading Loading
lib/strings.nix +2 −1 Original line number Diff line number Diff line Loading @@ -337,6 +337,7 @@ rec { /** Concatenate a list of strings, adding a newline at the end of each one. Defined as `concatMapStrings (s: s + "\n")`. # Inputs Loading @@ -360,7 +361,7 @@ rec { ::: */ concatLines = str: concatStringsSep "\n" str + "\n"; concatLines = concatMapStrings (s: s + "\n"); /** Given string `s`, replace every occurrence of the string `from` with the string `to`. Loading
lib/tests/misc.nix +4 −0 Original line number Diff line number Diff line Loading @@ -559,6 +559,10 @@ runTests { ]; expected = "a\nb\nc\n"; }; testConcatLinesEmpty = { expr = concatLines [ ]; expected = ""; }; testMakeIncludePathWithPkgs = { expr = ( Loading