1 { fetchurl, lib, stdenv, emacs }:
3 stdenv.mkDerivation rec {
7 url = "mirror://gnu/idutils/${name}.tar.xz";
8 sha256 = "1hmai3422iaqnp34kkzxdnywl7n7pvlxp11vrw66ybxn9wxg90c1";
13 # Fix for building on Glibc 2.16. Won't be needed once the
14 # gnulib in idutils is updated.
15 sed -i '/gets is a security hole/d' lib/stdio.in.h
18 buildInputs = lib.optional stdenv.isLinux emacs;
20 doCheck = !stdenv.isDarwin;
22 patches = [ ./nix-mapping.patch ];
25 description = "Text searching utility";
28 An "ID database" is a binary file containing a list of file
29 names, a list of tokens, and a sparse matrix indicating which
30 tokens appear in which files.
32 With this database and some tools to query it, many
33 text-searching tasks become simpler and faster. For example,
34 you can list all files that reference a particular `\#include'
35 file throughout a huge source hierarchy, search for all the
36 memos containing references to a project, or automatically
37 invoke an editor on all files containing references to some
38 function or variable. Anyone with a large software project to
39 maintain, or a large set of text files to organize, can benefit
40 from the ID utilities.
42 Although the name `ID' is short for `identifier', the ID
43 utilities handle more than just identifiers; they also treat
44 other kinds of tokens, most notably numeric constants, and the
45 contents of certain character strings.
48 homepage = "https://www.gnu.org/software/idutils/";
49 license = lib.licenses.gpl3Plus;
52 platforms = lib.platforms.all;