From 220e3817b8c637b60783946003899c419aa3303b Mon Sep 17 00:00:00 2001 From: John Ericson Date: Mon, 14 Aug 2017 18:12:09 -0400 Subject: [PATCH] findutils: Manually specify sort's location Run-time deps aren't necessarily on the PATH, so we cannot rely on configure finding it. N.B. on cross `-z` support is assumed missing, which is an incorrect assumption. --- pkgs/tools/misc/findutils/default.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/misc/findutils/default.nix b/pkgs/tools/misc/findutils/default.nix index 06a140fed50..4eef3f7a9d5 100644 --- a/pkgs/tools/misc/findutils/default.nix +++ b/pkgs/tools/misc/findutils/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { patches = [ ./memory-leak.patch ./no-install-statedir.patch ]; - buildInputs = optionals (hostPlatform == buildPlatform) [ coreutils ]; # bin/updatedb script needs to call sort + buildInputs = [ coreutils ]; # bin/updatedb script needs to call sort # Since glibc-2.25 the i686 tests hang reliably right after test-sleep. doCheck @@ -25,7 +25,12 @@ stdenv.mkDerivation rec { outputs = [ "out" "info" ]; - configureFlags = [ "--localstatedir=/var/cache" ]; + configureFlags = [ + # "sort" need not be on the PATH as a run-time dep, so we need to tell + # configure where it is. Covers the cross and native case alike. + "SORT=${coreutils}/bin/sort" + "--localstatedir=/var/cache" + ]; enableParallelBuilding = true;