summary refs log tree commit diff
path: root/pkgs/tools/misc/findutils
diff options
context:
space:
mode:
authorRoss MacLeod <rmm-github@z.odi.ac>2017-06-04 17:32:55 +0000
committerJohn Ericson <John.Ericson@Obsidian.Systems>2017-06-22 17:53:54 -0400
commitd710c2d9430f0ebc3f743c4ca5c6e3e5718c149e (patch)
treeee46cd290b7d6016745319ab8434c786e72af50b /pkgs/tools/misc/findutils
parent54089620f5ef77f7c1ed3b5db497986423f0d0f4 (diff)
downloadnixpkgs-d710c2d9430f0ebc3f743c4ca5c6e3e5718c149e.tar
nixpkgs-d710c2d9430f0ebc3f743c4ca5c6e3e5718c149e.tar.gz
nixpkgs-d710c2d9430f0ebc3f743c4ca5c6e3e5718c149e.tar.bz2
nixpkgs-d710c2d9430f0ebc3f743c4ca5c6e3e5718c149e.tar.lz
nixpkgs-d710c2d9430f0ebc3f743c4ca5c6e3e5718c149e.tar.xz
nixpkgs-d710c2d9430f0ebc3f743c4ca5c6e3e5718c149e.tar.zst
nixpkgs-d710c2d9430f0ebc3f743c4ca5c6e3e5718c149e.zip
findutils: modernize and fix cross
Diffstat (limited to 'pkgs/tools/misc/findutils')
-rw-r--r--pkgs/tools/misc/findutils/default.nix19
1 files changed, 11 insertions, 8 deletions
diff --git a/pkgs/tools/misc/findutils/default.nix b/pkgs/tools/misc/findutils/default.nix
index 53d75485d5c..06a140fed50 100644
--- a/pkgs/tools/misc/findutils/default.nix
+++ b/pkgs/tools/misc/findutils/default.nix
@@ -1,4 +1,9 @@
-{ stdenv, fetchurl, coreutils }:
+{ stdenv, fetchurl
+, coreutils
+, buildPlatform, hostPlatform
+}:
+
+let inherit (stdenv.lib) optionals; in
 
 stdenv.mkDerivation rec {
   name = "findutils-4.6.0";
@@ -10,20 +15,18 @@ stdenv.mkDerivation rec {
 
   patches = [ ./memory-leak.patch ./no-install-statedir.patch ];
 
-  buildInputs = [ coreutils ]; # bin/updatedb script needs to call sort
+  buildInputs = optionals (hostPlatform == buildPlatform) [ coreutils ]; # bin/updatedb script needs to call sort
 
   # Since glibc-2.25 the i686 tests hang reliably right after test-sleep.
-  doCheck = !stdenv.isDarwin && (stdenv.system != "i686-linux");
+  doCheck
+    =  !hostPlatform.isDarwin
+    && !(hostPlatform.libc == "glibc" && hostPlatform.isi686)
+    && hostPlatform == buildPlatform;
 
   outputs = [ "out" "info" ];
 
   configureFlags = [ "--localstatedir=/var/cache" ];
 
-  crossAttrs = {
-    # Fix the 'buildInputs = [ coreutils ]' above - that adds the cross coreutils to PATH :(
-    propagatedBuildInputs = [ ];
-  };
-
   enableParallelBuilding = true;
 
   meta = {