diff options
Diffstat (limited to 'pkgs/lib/strings.nix')
-rw-r--r-- | pkgs/lib/strings.nix | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/pkgs/lib/strings.nix b/pkgs/lib/strings.nix index 838990793276..73520a949c13 100644 --- a/pkgs/lib/strings.nix +++ b/pkgs/lib/strings.nix @@ -16,6 +16,7 @@ rec { # Map a function over a list and concatenate the resulting strings. concatMapStrings = f: list: concatStrings (map f list); + concatImapStrings = f: list: concatStrings (lib.imap f list); # Place an element between each element of a list, e.g., @@ -45,6 +46,10 @@ rec { makeLibraryPath = makeSearchPath "lib"; + # Idem for Perl search paths. + makePerlPath = makeSearchPath "lib/perl5/site_perl"; + + # Dependening on the boolean `cond', return either the given string # or the empty string. optionalString = cond: string: if cond then string else ""; |