mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-26 21:33:03 +03:00
systemPackages, makeLibraryPath: try to guess outputs
This commit is contained in:
parent
cefdc20c00
commit
c2fff72836
@ -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.
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user