systemPackages, makeLibraryPath: try to guess outputs

This commit is contained in:
Vladimír Čunát 2015-05-05 11:35:11 +02:00
parent cefdc20c00
commit c2fff72836
2 changed files with 12 additions and 2 deletions

View File

@ -47,7 +47,9 @@ rec {
# 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";
makeLibraryPath = pkgs: makeSearchPath "lib"
# try to guess the right output of each pkg
(map (pkg: pkg.lib or (pkg.out or pkg)) pkgs);
# Idem for Perl search paths.

View File

@ -115,7 +115,15 @@ in
system.path = pkgs.buildEnv {
name = "system-path";
paths = config.environment.systemPackages;
paths = let
#outputs TODO: make it user-customizable?
pkgOutputFun = pkg: lib.filter (p: p!=null) [
(pkg.bin or (pkg.out or pkg))
(pkg.man or null)
(pkg.info or null)
(pkg.doc or null)
];
in lib.concatMap pkgOutputFun config.environment.systemPackages;
inherit (config.environment) pathsToLink;
ignoreCollisions = true;
# !!! Hacky, should modularise.