1 { fetchurl, lib, stdenv, emacs, gnulib, autoconf, bison, automake, gettext, gperf, texinfo, perl, rsync, darwin }:
3 stdenv.mkDerivation rec {
8 url = "mirror://gnu/idutils/idutils-${version}.tar.xz";
9 sha256 = "1hmai3422iaqnp34kkzxdnywl7n7pvlxp11vrw66ybxn9wxg90c1";
13 # replace embedded gnulib tests with those from gnulib package
14 bash -O extglob -c "cd gnulib-tests; rm -r !(Makefile.am)"
15 substituteInPlace ./configure.ac --replace "AC_PREREQ(2.61)" "AC_PREREQ(2.64)"
16 ./bootstrap --force --gnulib-srcdir=${gnulib} --skip-po --bootstrap-sync --no-git
19 buildInputs = lib.optionals stdenv.hostPlatform.isLinux [
21 ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
22 darwin.apple_sdk.frameworks.CoreServices
25 nativeBuildInputs = [ gnulib autoconf bison automake gettext gperf texinfo perl rsync ];
27 doCheck = !stdenv.hostPlatform.isDarwin;
29 patches = [ ./nix-mapping.patch ];
32 description = "Text searching utility";
35 An "ID database" is a binary file containing a list of file
36 names, a list of tokens, and a sparse matrix indicating which
37 tokens appear in which files.
39 With this database and some tools to query it, many
40 text-searching tasks become simpler and faster. For example,
41 you can list all files that reference a particular `\#include'
42 file throughout a huge source hierarchy, search for all the
43 memos containing references to a project, or automatically
44 invoke an editor on all files containing references to some
45 function or variable. Anyone with a large software project to
46 maintain, or a large set of text files to organize, can benefit
47 from the ID utilities.
49 Although the name `ID' is short for `identifier', the ID
50 utilities handle more than just identifiers; they also treat
51 other kinds of tokens, most notably numeric constants, and the
52 contents of certain character strings.
55 homepage = "https://www.gnu.org/software/idutils/";
56 license = licenses.gpl3Plus;
58 maintainers = with maintainers; [ gfrascadorio ];
59 platforms = lib.platforms.all;