From dcf01e5925d82c8bf19b04f2afb99bc6d822d8ef Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 4 Jun 2008 09:56:11 +0000 Subject: [PATCH] * A convenience function `makeLibraryPath' that adds "/lib" to each element of a list and concatenates them separated by colons. svn path=/nixpkgs/branches/stdenv-updates/; revision=11970 --- pkgs/lib/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/lib/default.nix b/pkgs/lib/default.nix index 20a441b5b43..1df45f96f37 100644 --- a/pkgs/lib/default.nix +++ b/pkgs/lib/default.nix @@ -72,6 +72,8 @@ rec { concatStringsSep = separator: list: concatStrings (intersperse separator list); + makeLibraryPath = paths: concatStringsSep ":" (map (path: path + "/lib") paths); + # Flatten the argument into a single list; that is, nested lists are # spliced into the top-level lists. E.g., `flatten [1 [2 [3] 4] 5]