diff options
author | Nikolay Amiantov <ab@fmap.me> | 2016-04-13 15:53:51 +0300 |
---|---|---|
committer | Nikolay Amiantov <ab@fmap.me> | 2016-04-13 22:09:41 +0300 |
commit | 8b7ebaffeb3087ef18ff5c0f38cc3f44f7f8124e (patch) | |
tree | 8bab721107fae818dad896a0876d50d3d0a0d981 | |
parent | e26119619f7ce64b065e692ba0cd31f53b9ef637 (diff) |
replace makeSearchPath tree-wise to take care of possible multiple outputs
56 files changed, 71 insertions, 72 deletions
diff --git a/nixos/modules/services/misc/octoprint.nix b/nixos/modules/services/misc/octoprint.nix index 8ab2a9307a71..c0af3587205a 100644 --- a/nixos/modules/services/misc/octoprint.nix +++ b/nixos/modules/services/misc/octoprint.nix @@ -102,7 +102,7 @@ in wantedBy = [ "multi-user.target" ]; after = [ "network.target" ]; path = [ pluginsEnv ]; - environment.PYTHONPATH = makeSearchPath pkgs.python.sitePackages [ pluginsEnv ]; + environment.PYTHONPATH = makeSearchPathOutputs pkgs.python.sitePackages ["lib"] [ pluginsEnv ]; preStart = '' mkdir -p "${cfg.stateDir}" diff --git a/nixos/modules/services/web-servers/apache-httpd/trac.nix b/nixos/modules/services/web-servers/apache-httpd/trac.nix index c5c11029010e..c4aa6b6ad3a3 100644 --- a/nixos/modules/services/web-servers/apache-httpd/trac.nix +++ b/nixos/modules/services/web-servers/apache-httpd/trac.nix @@ -96,7 +96,7 @@ in globalEnvVars = singleton { name = "PYTHONPATH"; value = - makeSearchPath "lib/${pkgs.python.libPrefix}/site-packages" + makeSearchPathOutputs "lib/${pkgs.python.libPrefix}/site-packages" ["lib"] [ pkgs.mod_python pkgs.pythonPackages.trac pkgs.setuptools diff --git a/nixos/modules/services/x11/desktop-managers/enlightenment.nix b/nixos/modules/services/x11/desktop-managers/enlightenment.nix index c981b40f74a6..11df7297833b 100644 --- a/nixos/modules/services/x11/desktop-managers/enlightenment.nix +++ b/nixos/modules/services/x11/desktop-managers/enlightenment.nix @@ -7,7 +7,7 @@ let e = pkgs.enlightenment; xcfg = config.services.xserver; cfg = xcfg.desktopManager.enlightenment; - GST_PLUGIN_PATH = lib.makeSearchPath "lib/gstreamer-1.0" [ + GST_PLUGIN_PATH = lib.makeSearchPathOutputs "lib/gstreamer-1.0" ["lib"] [ pkgs.gst_all_1.gst-plugins-base pkgs.gst_all_1.gst-plugins-good pkgs.gst_all_1.gst-plugins-bad diff --git a/nixos/modules/system/boot/loader/grub/grub.nix b/nixos/modules/system/boot/loader/grub/grub.nix index d9f6f51f13a2..05322497a4bf 100644 --- a/nixos/modules/system/boot/loader/grub/grub.nix +++ b/nixos/modules/system/boot/loader/grub/grub.nix @@ -55,10 +55,10 @@ let version extraConfig extraPerEntryConfig extraEntries extraEntriesBeforeNixOS extraPrepareConfig configurationLimit copyKernels timeout default fsIdentifier efiSupport gfxmodeEfi gfxmodeBios; - path = (makeSearchPath "bin" ([ + path = (makeBinPath ([ pkgs.coreutils pkgs.gnused pkgs.gnugrep pkgs.findutils pkgs.diffutils pkgs.btrfs-progs pkgs.utillinux ] ++ (if cfg.efiSupport && (cfg.version == 2) then [pkgs.efibootmgr ] else []) - )) + ":" + (makeSearchPath "sbin" [ + )) + ":" + (makeSearchPathOutputs "sbin" ["bin"] [ pkgs.mdadm pkgs.utillinux ]); }); diff --git a/nixos/modules/system/boot/systemd-unit-options.nix b/nixos/modules/system/boot/systemd-unit-options.nix index d4cab93b26b8..c8c9cda913c0 100644 --- a/nixos/modules/system/boot/systemd-unit-options.nix +++ b/nixos/modules/system/boot/systemd-unit-options.nix @@ -193,7 +193,7 @@ in rec { path = mkOption { default = []; - apply = ps: "${makeSearchPath "bin" ps}:${makeSearchPath "sbin" ps}"; + apply = ps: "${makeBinPath ps}:${makeSearchPathOutputs "sbin" ["bin"] ps}"; description = '' Packages added to the service's <envar>PATH</envar> environment variable. Both the <filename>bin</filename> diff --git a/nixos/modules/virtualisation/azure-agent.nix b/nixos/modules/virtualisation/azure-agent.nix index da97565fd6de..a89cd454dc73 100644 --- a/nixos/modules/virtualisation/azure-agent.nix +++ b/nixos/modules/virtualisation/azure-agent.nix @@ -42,7 +42,7 @@ let wrapProgram "$out/bin/waagent" \ --prefix PYTHONPATH : $PYTHONPATH \ - --prefix PATH : "${makeSearchPath "bin" runtimeDeps}" + --prefix PATH : "${makeBinPath runtimeDeps}" ''; }; diff --git a/nixos/modules/virtualisation/virtualbox-guest.nix b/nixos/modules/virtualisation/virtualbox-guest.nix index 9733bd6fac46..3a10871ce840 100644 --- a/nixos/modules/virtualisation/virtualbox-guest.nix +++ b/nixos/modules/virtualisation/virtualbox-guest.nix @@ -66,7 +66,7 @@ in services.xserver.displayManager.sessionCommands = '' - PATH=${makeSearchPath "bin" [ pkgs.gnugrep pkgs.which pkgs.xorg.xorgserver.out ]}:$PATH \ + PATH=${makeBinPath [ pkgs.gnugrep pkgs.which pkgs.xorg.xorgserver.out ]}:$PATH \ ${kernel.virtualboxGuestAdditions}/bin/VBoxClient-all ''; diff --git a/pkgs/applications/misc/guake/default.nix b/pkgs/applications/misc/guake/default.nix index 4f6733e7d8de..81ac845c5cf8 100644 --- a/pkgs/applications/misc/guake/default.nix +++ b/pkgs/applications/misc/guake/default.nix @@ -16,8 +16,7 @@ gconftool-2 --recursive-unset /apps/guake with lib; let inputs = [ dbus gtk2 gconf python2 libutempter vte keybinder gnome3.gnome_common ]; - pySubDir = "lib/${python2.libPrefix}/site-packages"; - pyPath = makeSearchPath pySubDir (attrVals [ "dbus" "notify" "pyGtkGlade" "pyxdg" ] python2Packages ++ [ gnome2.gnome_python ]); + pyPath = makeSearchPathOutputs python2.sitePackages ["lib"] (attrVals [ "dbus" "notify" "pyGtkGlade" "pyxdg" ] python2Packages ++ [ gnome2.gnome_python ]); in stdenv.mkDerivation rec { name = "guake-${version}"; version = "0.8.3"; @@ -63,7 +62,7 @@ let inputs = [ dbus gtk2 gconf python2 libutempter vte keybinder gnome3.gnome_co wrapProgram $bin \ --prefix XDG_DATA_DIRS : "$out/share:$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH" \ --prefix LD_LIBRARY_PATH : ${makeLibraryPath inputs} \ - --prefix PYTHONPATH : "$out/${pySubDir}:${pyPath}:$PYTHONPATH" + --prefix PYTHONPATH : "$out/${python2.sitePackages}:${pyPath}:$PYTHONPATH" done ''; diff --git a/pkgs/applications/misc/playonlinux/default.nix b/pkgs/applications/misc/playonlinux/default.nix index 178fc13065b3..4bf6e36f1d26 100644 --- a/pkgs/applications/misc/playonlinux/default.nix +++ b/pkgs/applications/misc/playonlinux/default.nix @@ -26,7 +26,7 @@ assert stdenv.isLinux; let version = "4.2.9"; - binpath = stdenv.lib.makeSearchPath "bin" + binpath = stdenv.lib.makeBinPath [ cabextract python2Packages.python gettext diff --git a/pkgs/applications/misc/roxterm/default.nix b/pkgs/applications/misc/roxterm/default.nix index 93ee6470b7c3..ec055f3055fc 100644 --- a/pkgs/applications/misc/roxterm/default.nix +++ b/pkgs/applications/misc/roxterm/default.nix @@ -29,7 +29,7 @@ in stdenv.mkDerivation rec { "-I${dbus_libs.lib}/lib/dbus-1.0/include" ]; # Fix up python path so the lockfile library is on it. - PYTHONPATH = stdenv.lib.makeSearchPath "lib/${pythonFull.libPrefix}/site-packages" [ + PYTHONPATH = stdenv.lib.makeSearchPathOutputs pythonFull.sitePackages ["lib"] [ pythonPackages.curses pythonPackages.lockfile ]; diff --git a/pkgs/applications/misc/zathura/default.nix b/pkgs/applications/misc/zathura/default.nix index 8b37e22d117a..0ad3bf2adb99 100644 --- a/pkgs/applications/misc/zathura/default.nix +++ b/pkgs/applications/misc/zathura/default.nix @@ -30,7 +30,7 @@ rec { name = "zathura-${zathura_core.version}"; - plugins_path = stdenv.lib.makeSearchPath "lib" [ + plugins_path = stdenv.lib.makeLibraryPath [ zathura_djvu zathura_ps (if useMupdf then zathura_pdf_mupdf else zathura_pdf_poppler) diff --git a/pkgs/applications/networking/browsers/chromium/plugins.nix b/pkgs/applications/networking/browsers/chromium/plugins.nix index 82b3bc3ea59c..b7883454b349 100644 --- a/pkgs/applications/networking/browsers/chromium/plugins.nix +++ b/pkgs/applications/networking/browsers/chromium/plugins.nix @@ -64,8 +64,8 @@ let ''; patchPhase = let - rpaths = [ stdenv.cc.cc.lib ]; - mkrpath = p: "${makeSearchPath "lib64" p}:${makeSearchPath "lib" p}"; + rpaths = [ stdenv.cc.cc ]; + mkrpath = p: "${makeSearchPathOutputs "lib64" ["lib"] p}:${makeLibraryPath p}"; in '' for sofile in PepperFlash/libpepflashplayer.so \ libwidevinecdm.so libwidevinecdmadapter.so; do diff --git a/pkgs/applications/networking/browsers/firefox-bin/default.nix b/pkgs/applications/networking/browsers/firefox-bin/default.nix index d2d6fcb59342..152089286b48 100644 --- a/pkgs/applications/networking/browsers/firefox-bin/default.nix +++ b/pkgs/applications/networking/browsers/firefox-bin/default.nix @@ -105,7 +105,7 @@ stdenv.mkDerivation { libheimdal libpulseaudio systemd - ] + ":" + stdenv.lib.makeSearchPath "lib64" [ + ] + ":" + stdenv.lib.makeSearchPathOutputs "lib64" ["lib"] [ stdenv.cc.cc ]; diff --git a/pkgs/applications/networking/browsers/opera/default.nix b/pkgs/applications/networking/browsers/opera/default.nix index de7240d3a83b..325e855ec72e 100644 --- a/pkgs/applications/networking/browsers/opera/default.nix +++ b/pkgs/applications/networking/browsers/opera/default.nix @@ -46,7 +46,7 @@ stdenv.mkDerivation rec { libPath = stdenv.lib.makeLibraryPath buildInputs + stdenv.lib.optionalString (stdenv.system == "x86_64-linux") - (":" + stdenv.lib.makeSearchPath "lib64" buildInputs); + (":" + stdenv.lib.makeSearchPathOutputs "lib64" ["lib"] buildInputs); preFixup = '' diff --git a/pkgs/applications/networking/browsers/vivaldi/default.nix b/pkgs/applications/networking/browsers/vivaldi/default.nix index 651f513356b6..7c3c167cf32d 100644 --- a/pkgs/applications/networking/browsers/vivaldi/default.nix +++ b/pkgs/applications/networking/browsers/vivaldi/default.nix @@ -46,7 +46,7 @@ stdenv.mkDerivation rec { libPath = stdenv.lib.makeLibraryPath buildInputs + stdenv.lib.optionalString (stdenv.system == "x86_64-linux") - (":" + stdenv.lib.makeSearchPath "lib64" buildInputs); + (":" + stdenv.lib.makeSearchPathOutputs "lib64" ["lib"] buildInputs); buildPhase = '' echo "Patching Vivaldi binaries" diff --git a/pkgs/applications/networking/dropbox/default.nix b/pkgs/applications/networking/dropbox/default.nix index e20db1892bb1..d27a6a7b8491 100644 --- a/pkgs/applications/networking/dropbox/default.nix +++ b/pkgs/applications/networking/dropbox/default.nix @@ -36,7 +36,7 @@ let # relative location where the dropbox libraries are stored appdir = "opt/dropbox"; - ldpath = stdenv.lib.makeSearchPath "lib" + ldpath = stdenv.lib.makeLibraryPath [ dbus_libs gcc.cc glib libdrm libffi libICE libSM libX11 libXmu ncurses popt qtbase qtdeclarative qtwebkit zlib diff --git a/pkgs/applications/networking/instant-messengers/hipchat/default.nix b/pkgs/applications/networking/instant-messengers/hipchat/default.nix index 6449c9d3d1a5..b57b3394eea7 100644 --- a/pkgs/applications/networking/instant-messengers/hipchat/default.nix +++ b/pkgs/applications/networking/instant-messengers/hipchat/default.nix @@ -6,7 +6,7 @@ let version = "4.0.1631"; - rpath = stdenv.lib.makeSearchPath "lib" [ + rpath = stdenv.lib.makeLibraryPath [ xorg.libXext xorg.libSM xorg.libICE diff --git a/pkgs/applications/networking/instant-messengers/slack/default.nix b/pkgs/applications/networking/instant-messengers/slack/default.nix index 417eecb4ac8c..581d9d171b95 100644 --- a/pkgs/applications/networking/instant-messengers/slack/default.nix +++ b/pkgs/applications/networking/instant-messengers/slack/default.nix @@ -6,7 +6,7 @@ let version = "2.0.3"; - rpath = stdenv.lib.makeSearchPath "lib" [ + rpath = stdenv.lib.makeLibraryPath [ alsaLib atk cairo diff --git a/pkgs/applications/networking/mailreaders/thunderbird-bin/default.nix b/pkgs/applications/networking/mailreaders/thunderbird-bin/default.nix index 388fc418de15..bbb51c7c1865 100644 --- a/pkgs/applications/networking/mailreaders/thunderbird-bin/default.nix +++ b/pkgs/applications/networking/mailreaders/thunderbird-bin/default.nix @@ -105,7 +105,7 @@ stdenv.mkDerivation { nspr nss pango - ] + ":" + stdenv.lib.makeSearchPath "lib64" [ + ] + ":" + stdenv.lib.makeSearchPathOutputs "lib64" ["lib"] [ stdenv.cc.cc ]; diff --git a/pkgs/applications/networking/spideroak/default.nix b/pkgs/applications/networking/spideroak/default.nix index fd060ad08801..23c226b9f8a5 100644 --- a/pkgs/applications/networking/spideroak/default.nix +++ b/pkgs/applications/networking/spideroak/default.nix @@ -16,7 +16,7 @@ let else if stdenv.system == "i686-linux" then "8c23271291f40aa144bbf38ceb3cc2a05bed00759c87a65bd798cf8bb289d07a" else throw "Spideroak client for: ${stdenv.system} not supported!"; - ldpath = stdenv.lib.makeSearchPath "lib" [ + ldpath = stdenv.lib.makeLibraryPath [ glib fontconfig libXext libX11 freetype libXrender ]; diff --git a/pkgs/applications/science/machine-learning/torch/torch-distro.nix b/pkgs/applications/science/machine-learning/torch/torch-distro.nix index 067cb1341140..5ff510a52ce8 100644 --- a/pkgs/applications/science/machine-learning/torch/torch-distro.nix +++ b/pkgs/applications/science/machine-learning/torch/torch-distro.nix @@ -73,8 +73,8 @@ let for p in $out/bin/*; do wrapProgram $p \ - --suffix LD_LIBRARY_PATH ';' "${lib.makeSearchPath "lib" runtimeDeps_}" \ - --suffix PATH ';' "${lib.makeSearchPath "bin" runtimeDeps_}" \ + --suffix LD_LIBRARY_PATH ';' "${lib.makeLibraryPath runtimeDeps_}" \ + --suffix PATH ';' "${lib.makeBinPath runtimeDeps_}" \ --suffix LUA_PATH ';' "\"$LUA_PATH\"" \ --suffix LUA_PATH ';' "\"$out/share/lua/${lua.luaversion}/?.lua;$out/share/lua/${lua.luaversion}/?/init.lua\"" \ --suffix LUA_CPATH ';' "\"$LUA_CPATH\"" \ diff --git a/pkgs/applications/science/math/mathematica/9.nix b/pkgs/applications/science/math/mathematica/9.nix index 7573b8955b19..2a43cf5677fe 100644 --- a/pkgs/applications/science/math/mathematica/9.nix +++ b/pkgs/applications/science/math/mathematica/9.nix @@ -63,7 +63,7 @@ stdenv.mkDerivation rec { ldpath = stdenv.lib.makeLibraryPath buildInputs + stdenv.lib.optionalString (stdenv.system == "x86_64-linux") - (":" + stdenv.lib.makeSearchPath "lib64" buildInputs); + (":" + stdenv.lib.makeSearchPathOutputs "lib64" ["lib"] buildInputs); phases = "unpackPhase installPhase fixupPhase"; diff --git a/pkgs/applications/science/math/mathematica/default.nix b/pkgs/applications/science/math/mathematica/default.nix index 05c6f2622934..c2988331c4cd 100644 --- a/pkgs/applications/science/math/mathematica/default.nix +++ b/pkgs/applications/science/math/mathematica/default.nix @@ -73,7 +73,7 @@ stdenv.mkDerivation rec { ldpath = stdenv.lib.makeLibraryPath buildInputs + stdenv.lib.optionalString (stdenv.system == "x86_64-linux") - (":" + stdenv.lib.makeSearchPath "lib64" buildInputs); + (":" + stdenv.lib.makeSearchPathOutputs "lib64" ["lib"] buildInputs); phases = "unpackPhase installPhase fixupPhase"; diff --git a/pkgs/applications/science/math/maxima/default.nix b/pkgs/applications/science/math/maxima/default.nix index e42bd0f83ee0..4497356a29f8 100644 --- a/pkgs/applications/science/math/maxima/default.nix +++ b/pkgs/applications/science/math/maxima/default.nix @@ -5,7 +5,7 @@ let version = "5.36.1"; searchPath = - stdenv.lib.makeSearchPath "bin" + stdenv.lib.makeBinPath (stdenv.lib.filter (x: x != null) [ sbcl rlwrap tk gnuplot ]); in stdenv.mkDerivation { diff --git a/pkgs/applications/version-management/cvs-fast-export/default.nix b/pkgs/applications/version-management/cvs-fast-export/default.nix index 62a58ee985c0..eae18c39dadd 100644 --- a/pkgs/applications/version-management/cvs-fast-export/default.nix +++ b/pkgs/applications/version-management/cvs-fast-export/default.nix @@ -39,7 +39,7 @@ mkDerivation rec { postInstall = let - binpath = makeSearchPath "bin" [ out rcs cvs git coreutils rsync ]; + binpath = makeBinPath [ out rcs cvs git coreutils rsync ]; in '' for prog in cvs-fast-export cvsconvert cvssync; do wrapProgram $out/bin/$prog \ diff --git a/pkgs/applications/version-management/cvs2svn/default.nix b/pkgs/applications/version-management/cvs2svn/default.nix index 870248ed75d2..85749f978d1c 100644 --- a/pkgs/applications/version-management/cvs2svn/default.nix +++ b/pkgs/applications/version-management/cvs2svn/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { python ./setup.py install --prefix=$out for i in bzr svn git; do wrapProgram $out/bin/cvs2$i \ - --prefix PATH : "${lib.makeSearchPath "bin" [ cvs ]}" \ + --prefix PATH : "${lib.makeBinPath [ cvs ]}" \ --set PYTHONPATH "$(toPythonPath $out):$PYTHONPATH" done ''; diff --git a/pkgs/applications/version-management/reposurgeon/default.nix b/pkgs/applications/version-management/reposurgeon/default.nix index 5c2dde955721..669151adbcc8 100644 --- a/pkgs/applications/version-management/reposurgeon/default.nix +++ b/pkgs/applications/version-management/reposurgeon/default.nix @@ -46,12 +46,12 @@ mkDerivation rec { postInstall = let - binpath = makeSearchPath "bin" ( + binpath = makeBinPath ( filter (x: x != null) [ out git bazaar cvs darcs fossil mercurial monotone rcs src subversion cvs_fast_export ] ); - pythonpath = makeSearchPath (python27.sitePackages) ( + pythonpath = makeSearchPathOutputs python27.sitePackages ["lib"] ( filter (x: x != null) [ python27Packages.readline or null python27Packages.hglib or null ] ); diff --git a/pkgs/applications/version-management/smartgithg/default.nix b/pkgs/applications/version-management/smartgithg/default.nix index 292d6fc934b5..51d70156e9ce 100644 --- a/pkgs/applications/version-management/smartgithg/default.nix +++ b/pkgs/applications/version-management/smartgithg/default.nix @@ -24,7 +24,7 |