summary refs log tree commit diff
path: root/lib/strings.nix
diff options
context:
space:
mode:
authorNikolay Amiantov <ab@fmap.me>2016-04-14 18:15:11 +0300
committerNikolay Amiantov <ab@fmap.me>2016-04-25 13:24:39 +0300
commitc779e30d531032a7744685e80c2143b358efe1b0 (patch)
treea94f0d62255af253aa5320466309d548ae65a46a /lib/strings.nix
parentab0a0c004e1076315c8ed910437e6cf9c2f087ff (diff)
downloadnixpkgs-c779e30d531032a7744685e80c2143b358efe1b0.tar
nixpkgs-c779e30d531032a7744685e80c2143b358efe1b0.tar.gz
nixpkgs-c779e30d531032a7744685e80c2143b358efe1b0.tar.bz2
nixpkgs-c779e30d531032a7744685e80c2143b358efe1b0.tar.lz
nixpkgs-c779e30d531032a7744685e80c2143b358efe1b0.tar.xz
nixpkgs-c779e30d531032a7744685e80c2143b358efe1b0.tar.zst
nixpkgs-c779e30d531032a7744685e80c2143b358efe1b0.zip
make*Path: implement via makeSearchPathOutput
Diffstat (limited to 'lib/strings.nix')
-rw-r--r--lib/strings.nix10
1 files changed, 3 insertions, 7 deletions
diff --git a/lib/strings.nix b/lib/strings.nix
index 0e3137f42ee..9e9bdd6e153 100644
--- a/lib/strings.nix
+++ b/lib/strings.nix
@@ -107,9 +107,7 @@ rec {
        makeLibraryPath [ pkgs.openssl pkgs.zlib ]
        => "/nix/store/9rz8gxhzf8sw4kf2j2f1grr49w8zx5vj-openssl-1.0.1r/lib:/nix/store/wwh7mhwh269sfjkm6k5665b5kgp7jrk2-zlib-1.2.8/lib"
   */
-  makeLibraryPath = pkgs: makeSearchPath "lib"
-    # try to guess the right output of each pkg
-    (map (pkg: if pkg.outputUnspecified or false then pkg.lib or (pkg.out or pkg) else pkg) pkgs);
+  makeLibraryPath = makeSearchPathOutput "lib" "lib";
 
   /* Construct a binary search path (such as $PATH) containing the
      binaries for a set of packages.
@@ -118,8 +116,7 @@ rec {
        makeBinPath ["/root" "/usr" "/usr/local"]
        => "/root/bin:/usr/bin:/usr/local/bin"
   */
-  makeBinPath = pkgs: makeSearchPath "bin"
-    (map (pkg: if pkg.outputUnspecified or false then pkg.bin or (pkg.out or pkg) else pkg) pkgs);
+  makeBinPath = makeSearchPathOutput "bin" "bin";
 
 
   /* Construct a perl search path (such as $PERL5LIB)
@@ -131,8 +128,7 @@ rec {
        makePerlPath [ pkgs.perlPackages.NetSMTP ]
        => "/nix/store/n0m1fk9c960d8wlrs62sncnadygqqc6y-perl-Net-SMTP-1.25/lib/perl5/site_perl"
   */
-  makePerlPath = pkgs: makeSearchPath "lib/perl5/site_perl"
-    (map (pkg: if pkg.outputUnspecified or false then pkg.lib or (pkg.out or pkg) else pkg) pkgs);
+  makePerlPath = makeSearchPathOutput "lib" "lib/perl5/site_perl";
 
   /* Dependening on the boolean `cond', return either the given string
      or the empty string. Useful to contatenate against a bigger string.