mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 08:53:21 +00:00
* Added a function to make Unix-style search paths. This generalises
`makeLibraryPath'. svn path=/nixpkgs/trunk/; revision=14884
This commit is contained in:
parent
a5185e9477
commit
730f8c2b4d
@ -29,9 +29,16 @@ rec {
|
|||||||
concatStrings (intersperse separator list);
|
concatStrings (intersperse separator list);
|
||||||
|
|
||||||
|
|
||||||
# Construct an RPATH containing the libraries for a set of packages,
|
# Construct a Unix-style search path consisting of each `subDir"
|
||||||
# e.g. "${pkg1}/lib:${pkg2}/lib:...".
|
# directory of the given list of packages. For example,
|
||||||
makeLibraryPath = paths: concatStringsSep ":" (map (path: path + "/lib") paths);
|
# `makeSearchPath "bin" ["x" "y" "z"]' returns "x/bin:y/bin:z/bin".
|
||||||
|
makeSearchPath = subDir: packages:
|
||||||
|
concatStringsSep ":" (map (path: path + "/" + subDir) packages);
|
||||||
|
|
||||||
|
|
||||||
|
# Construct a library search path (such as RPATH) containing the
|
||||||
|
# libraries for a set of packages, e.g. "${pkg1}/lib:${pkg2}/lib:...".
|
||||||
|
makeLibraryPath = makeSearchPath "lib";
|
||||||
|
|
||||||
|
|
||||||
# Dependening on the boolean `cond', return either the given string
|
# Dependening on the boolean `cond', return either the given string
|
||||||
|
Loading…
Reference in New Issue
Block a user