nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ stdenv, fetchurl
2, coreutils
3}:
4
5stdenv.mkDerivation rec {
6 name = "findutils-4.6.0";
7
8 src = fetchurl {
9 url = "mirror://gnu/findutils/${name}.tar.gz";
10 sha256 = "178nn4dl7wbcw499czikirnkniwnx36argdnqgz4ik9i6zvwkm6y";
11 };
12
13 patches = [
14 ./memory-leak.patch
15 ./no-install-statedir.patch
16
17 # Prevent tests from failing on old kernels (2.6x)
18 # getdtablesize reports incorrect values if getrlimit() fails
19 ./disable-getdtablesize-test.patch
20 ];
21
22 buildInputs = [ coreutils ]; # bin/updatedb script needs to call sort
23
24 # Since glibc-2.25 the i686 tests hang reliably right after test-sleep.
25 doCheck
26 = !stdenv.hostPlatform.isDarwin
27 && !(stdenv.hostPlatform.libc == "glibc" && stdenv.hostPlatform.isi686)
28 && (stdenv.hostPlatform.libc != "musl")
29 && stdenv.hostPlatform == stdenv.buildPlatform;
30
31 outputs = [ "out" "info" ];
32
33 configureFlags = [
34 # "sort" need not be on the PATH as a run-time dep, so we need to tell
35 # configure where it is. Covers the cross and native case alike.
36 "SORT=${coreutils}/bin/sort"
37 "--localstatedir=/var/cache"
38 ];
39
40 enableParallelBuilding = true;
41
42 meta = {
43 homepage = https://www.gnu.org/software/findutils/;
44 description = "GNU Find Utilities, the basic directory searching utilities of the GNU operating system";
45
46 longDescription = ''
47 The GNU Find Utilities are the basic directory searching
48 utilities of the GNU operating system. These programs are
49 typically used in conjunction with other programs to provide
50 modular and powerful directory search and file locating
51 capabilities to other commands.
52
53 The tools supplied with this package are:
54
55 * find - search for files in a directory hierarchy;
56 * locate - list files in databases that match a pattern;
57 * updatedb - update a file name database;
58 * xargs - build and execute command lines from standard input.
59 '';
60
61 platforms = stdenv.lib.platforms.all;
62
63 license = stdenv.lib.licenses.gpl3Plus;
64 };
65}