From 282277dbc8770552e69ae3f2938ff4a01b750993 Mon Sep 17 00:00:00 2001 From: Tuomas Tynkkynen Date: Tue, 23 Aug 2016 01:13:49 +0300 Subject: [PATCH] treewide: Use more makeBinPath --- nixos/lib/testing.nix | 2 +- pkgs/applications/editors/idea/common.nix | 2 +- pkgs/applications/science/logic/satallax/default.nix | 2 +- pkgs/applications/virtualization/docker/default.nix | 2 +- pkgs/applications/window-managers/awesome/default.nix | 2 +- pkgs/development/libraries/libvirt/default.nix | 4 ++-- pkgs/servers/mail/postfix/default.nix | 4 ++-- pkgs/tools/networking/wicd/default.nix | 2 +- pkgs/tools/typesetting/asciidoc/default.nix | 2 +- pkgs/tools/virtualization/ec2-ami-tools/default.nix | 2 +- 10 files changed, 12 insertions(+), 12 deletions(-) diff --git a/nixos/lib/testing.nix b/nixos/lib/testing.nix index 5f463c092846..61b214bfba8c 100644 --- a/nixos/lib/testing.nix +++ b/nixos/lib/testing.nix @@ -29,7 +29,7 @@ rec { cp ${./test-driver/Logger.pm} $libDir/Logger.pm wrapProgram $out/bin/nixos-test-driver \ - --prefix PATH : "${qemu_kvm}/bin:${vde2}/bin:${netpbm}/bin:${coreutils}/bin" \ + --prefix PATH : "${lib.makeBinPath [ qemu_kvm vde2 netpbm coreutils ]}" \ --prefix PERL5LIB : "${with perlPackages; lib.makePerlPath [ TermReadLineGnu XMLWriter IOTty FileSlurp ]}:$out/lib/perl5/site_perl" ''; }; diff --git a/pkgs/applications/editors/idea/common.nix b/pkgs/applications/editors/idea/common.nix index 170a12d6d695..370660398516 100644 --- a/pkgs/applications/editors/idea/common.nix +++ b/pkgs/applications/editors/idea/common.nix @@ -62,7 +62,7 @@ with stdenv; lib.makeOverridable mkDerivation rec { item=${desktopItem} makeWrapper "$out/$name/bin/${loName}.sh" "$out/bin/${execName}" \ - --prefix PATH : "$out/libexec/${name}:${jdk}/bin:${coreutils}/bin:${gnugrep}/bin:${which}/bin:${git}/bin" \ + --prefix PATH : "$out/libexec/${name}:${stdenv.lib.makeBinPath [ jdk coreutils gnugrep which git ]}" \ --set JDK_HOME "$jdk" \ --set ${hiName}_JDK "$jdk" \ --set ANDROID_JAVA_HOME "$jdk" \ diff --git a/pkgs/applications/science/logic/satallax/default.nix b/pkgs/applications/science/logic/satallax/default.nix index 7935be11926d..6f42ff15a227 100644 --- a/pkgs/applications/science/logic/satallax/default.nix +++ b/pkgs/applications/science/logic/satallax/default.nix @@ -41,7 +41,7 @@ stdenv.mkDerivation rec { mkdir -p "$out/share/doc/satallax" "$out/bin" "$out/lib" "$out/lib/satallax" cp bin/satallax.opt "$out/bin/satallax" wrapProgram "$out/bin/satallax" \ - --suffix PATH : "${coq}/bin:${eprover}/bin:$out/libexec/satallax" \ + --suffix PATH : "${stdenv.lib.makeBinPath [ coq eprover ]}:$out/libexec/satallax" \ --add-flags "-M" --add-flags "$out/lib/satallax/modes" cp LICENSE README "$out/share/doc/satallax" diff --git a/pkgs/applications/virtualization/docker/default.nix b/pkgs/applications/virtualization/docker/default.nix index cfa58c717682..3d69de9c15ba 100644 --- a/pkgs/applications/virtualization/docker/default.nix +++ b/pkgs/applications/virtualization/docker/default.nix @@ -47,7 +47,7 @@ stdenv.mkDerivation rec { install -Dm755 ./bundles/${version}/dynbinary/docker-${version} $out/libexec/docker/docker install -Dm755 ./bundles/${version}/dynbinary/dockerinit-${version} $out/libexec/docker/dockerinit makeWrapper $out/libexec/docker/docker $out/bin/docker \ - --prefix PATH : "${iproute}/sbin:sbin:${iptables}/sbin:${e2fsprogs}/sbin:${xz.bin}/bin:${utillinux}/bin" + --prefix PATH : "${stdenv.lib.makeBinPath [ iproute iptables e2fsprogs xz utillinux ]}" # systemd install -Dm644 ./contrib/init/systemd/docker.service $out/etc/systemd/system/docker.service diff --git a/pkgs/applications/window-managers/awesome/default.nix b/pkgs/applications/window-managers/awesome/default.nix index d4721c992008..3a2a030b8a4d 100644 --- a/pkgs/applications/window-managers/awesome/default.nix +++ b/pkgs/applications/window-managers/awesome/default.nix @@ -74,7 +74,7 @@ stdenv.mkDerivation rec { --prefix LUA_PATH ";" '"${lgi}/share/lua/${lua.luaversion}/?.lua;${lgi}/share/lua/${lua.luaversion}/lgi/?.lua"' \ --prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH" \ --prefix LD_LIBRARY_PATH : "$LD_LIBRARY_PATH" \ - --prefix PATH : "${compton}/bin:${unclutter}/bin:${procps}/bin:${iproute}/sbin:${coreutils}/bin:${curl.bin}/bin:${alsaUtils}/bin:${findutils}/bin:${xterm}/bin" + --prefix PATH : "${stdenv.lib.makeBinPath [ compton unclutter procps iproute coreutils curl alsaUtils findutils xterm ]}" wrapProgram $out/bin/awesome-client \ --prefix PATH : "${which}/bin" diff --git a/pkgs/development/libraries/libvirt/default.nix b/pkgs/development/libraries/libvirt/default.nix index 1d585ce17faf..0f9b5b5155b5 100644 --- a/pkgs/development/libraries/libvirt/default.nix +++ b/pkgs/development/libraries/libvirt/default.nix @@ -31,7 +31,7 @@ stdenv.mkDerivation rec { ]; preConfigure = stdenv.lib.optionalString stdenv.isLinux '' - PATH=${iproute}/sbin:${iptables}/sbin:${ebtables}/sbin:${lvm2}/sbin:${systemd}/bin:$PATH + PATH=${stdenv.lib.makeBinPath [ iproute iptables ebtables lvm2 systemd ]}:$PATH substituteInPlace configure \ --replace 'as_dummy="/bin:/usr/bin:/usr/sbin"' 'as_dummy="${numad}/bin"' '' + '' @@ -69,7 +69,7 @@ stdenv.mkDerivation rec { --replace "$out/bin" "${gettext}/bin" '' + stdenv.lib.optionalString stdenv.isLinux '' wrapProgram $out/sbin/libvirtd \ - --prefix PATH : ${iptables}/sbin:${iproute}/sbin:${pmutils}/bin:${numad}/bin:${numactl}/bin + --prefix PATH : ${stdenv.lib.makeBinPath [ iptables iproute pmutils numad numactl ]} ''; enableParallelBuilding = true; diff --git a/pkgs/servers/mail/postfix/default.nix b/pkgs/servers/mail/postfix/default.nix index 99371f41b0f1..c4d46ff49e9e 100644 --- a/pkgs/servers/mail/postfix/default.nix +++ b/pkgs/servers/mail/postfix/default.nix @@ -75,9 +75,9 @@ in stdenv.mkDerivation rec { cp -rv installdir/etc $out sed -e '/^PATH=/d' -i $out/libexec/postfix/post-install wrapProgram $out/libexec/postfix/post-install \ - --prefix PATH ":" ${coreutils}/bin:${findutils}/bin:${gnugrep}/bin + --prefix PATH ":" ${lib.makeBinPath [ coreutils findutils gnugrep ]} wrapProgram $out/libexec/postfix/postfix-script \ - --prefix PATH ":" ${coreutils}/bin:${findutils}/bin:${gnugrep}/bin:${gawk}/bin:${gnused}/bin + --prefix PATH ":" ${lib.makeBinPath [ coreutils findutils gnugrep gawk gnused ]} ''; meta = { diff --git a/pkgs/tools/networking/wicd/default.nix b/pkgs/tools/networking/wicd/default.nix index 40acfaf323a2..59bbd918d643 100644 --- a/pkgs/tools/networking/wicd/default.nix +++ b/pkgs/tools/networking/wicd/default.nix @@ -37,7 +37,7 @@ in stdenv.mkDerivation rec { substituteInPlace in/scripts=wicd.in --subst-var-by TEMPLATE-DEFAULT $out/share/other/dhclient.conf.template.default - sed -i "2iexport PATH=${python}/bin:${wpa_supplicant}/sbin:${dhcpcd}/sbin:${dhcp}/sbin:${wirelesstools}/sbin:${nettools}/sbin:${nettools}/bin:${iputils}/bin:${openresolv}/sbin:${iproute}/sbin\$\{PATH:+:\}\$PATH" in/scripts=wicd.in + sed -i "2iexport PATH=${stdenv.lib.makeBinPath [ python wpa_supplicant dhcpcd dhcp wirelesstools nettools nettools iputils openresolv iproute ]}\$\{PATH:+:\}\$PATH" in/scripts=wicd.in sed -i "3iexport PYTHONPATH=$(toPythonPath $out):$(toPythonPath ${pygobject}):$(toPythonPath ${dbus-python})\$\{PYTHONPATH:+:\}\$PYTHONPATH" in/scripts=wicd.in sed -i "2iexport PATH=${python}/bin\$\{PATH:+:\}\$PATH" in/scripts=wicd-client.in sed -i "3iexport PYTHONPATH=$(toPythonPath $out):$(toPythonPath ${pyGtkGlade})/gtk-2.0:$(toPythonPath ${pygobject}):$(toPythonPath ${pygobject})/gtk-2.0:$(toPythonPath ${pycairo}):$(toPythonPath ${dbus-python})\$\{PYTHONPATH:+:\}\$PYTHONPATH" in/scripts=wicd-client.in diff --git a/pkgs/tools/typesetting/asciidoc/default.nix b/pkgs/tools/typesetting/asciidoc/default.nix index d9d69a4a4c01..59059c632b97 100644 --- a/pkgs/tools/typesetting/asciidoc/default.nix +++ b/pkgs/tools/typesetting/asciidoc/default.nix @@ -235,7 +235,7 @@ stdenv.mkDerivation rec { # use it to work around an impurity in the tetex package; tetex tools # cannot find their neighbours (e.g. pdflatex doesn't find mktextfm). # We can remove PATH= when those impurities are fixed. - sed -e "s|^ENV =.*|ENV = dict(XML_CATALOG_FILES='${docbook_xml_dtd_45}/xml/dtd/docbook/catalog.xml ${docbook5_xsl}/xml/xsl/docbook/catalog.xml ${docbook_xsl}/xml/xsl/docbook/catalog.xml', PATH='${tetex}/bin:${coreutils}/bin:${gnused}/bin')|" \ + sed -e "s|^ENV =.*|ENV = dict(XML_CATALOG_FILES='${docbook_xml_dtd_45}/xml/dtd/docbook/catalog.xml ${docbook5_xsl}/xml/xsl/docbook/catalog.xml ${docbook_xsl}/xml/xsl/docbook/catalog.xml', PATH='${stdenv.lib.makeBinPath [ tetex coreutils gnused ]}')|" \ -e "s|^ASCIIDOC =.*|ASCIIDOC = '$out/bin/asciidoc'|" \ -e "s|^XSLTPROC =.*|XSLTPROC = '${libxslt.bin}/bin/xsltproc'|" \ -e "s|^DBLATEX =.*|DBLATEX = '${dblatexFull}/bin/dblatex'|" \ diff --git a/pkgs/tools/virtualization/ec2-ami-tools/default.nix b/pkgs/tools/virtualization/ec2-ami-tools/default.nix index 6ccce4684ad5..edb3d6add169 100644 --- a/pkgs/tools/virtualization/ec2-ami-tools/default.nix +++ b/pkgs/tools/virtualization/ec2-ami-tools/default.nix @@ -29,7 +29,7 @@ stdenv.mkDerivation rec { for i in $out/bin/*; do wrapProgram $i \ --set EC2_HOME $out \ - --prefix PATH : ${ruby}/bin:${openssl.bin}/bin + --prefix PATH : ${stdenv.lib.makeBinPath [ ruby openssl ]} done sed -i 's|/bin/bash|${stdenv.shell}|' $out/lib/ec2/platform/base/pipeline.rb