at 23.11-beta 61 lines 2.2 kB view raw
1{ fetchurl, lib, stdenv, emacs, gnulib, autoconf, bison, automake, gettext, gperf, texinfo, perl, rsync, darwin }: 2 3stdenv.mkDerivation rec { 4 pname = "idutils"; 5 version = "4.6"; 6 7 src = fetchurl { 8 url = "mirror://gnu/idutils/idutils-${version}.tar.xz"; 9 sha256 = "1hmai3422iaqnp34kkzxdnywl7n7pvlxp11vrw66ybxn9wxg90c1"; 10 }; 11 12 preConfigure = '' 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 17 ''; 18 19 buildInputs = lib.optionals stdenv.isLinux [ 20 emacs 21 ] ++ lib.optionals stdenv.isDarwin [ 22 darwin.apple_sdk.frameworks.CoreServices 23 ]; 24 25 nativeBuildInputs = [ gnulib autoconf bison automake gettext gperf texinfo perl rsync ]; 26 27 doCheck = !stdenv.isDarwin; 28 29 patches = [ ./nix-mapping.patch ]; 30 31 meta = with lib; { 32 description = "Text searching utility"; 33 34 longDescription = '' 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. 38 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. 48 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. 53 ''; 54 55 homepage = "https://www.gnu.org/software/idutils/"; 56 license = licenses.gpl3Plus; 57 58 maintainers = with maintainers; [ gfrascadorio ]; 59 platforms = lib.platforms.all; 60 }; 61}