1 { lib, stdenv, fetchFromGitHub }:
7 src = fetchFromGitHub {
10 # This repository has numbered versions, but not Git tags.
11 rev = "eef20411d605d9d17ead07a0ade75046f2728e21";
12 sha256 = "14addnwspdf2mxpqyrw8b84bb2257y43g5ccy4ipgrr91fmxq2sk";
15 # Related: https://github.com/Wikinaut/agrep/pull/11
16 prePatch = lib.optionalString (stdenv.hostPlatform.isMusl || stdenv.isDarwin) ''
17 sed -i '1i#include <sys/stat.h>' checkfil.c newmgrep.c recursiv.c
20 install -Dm 555 agrep -t "$out/bin"
21 install -Dm 444 docs/* -t "$out/doc"
24 makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
27 description = "Approximate grep for fast fuzzy string searching";
28 homepage = "https://www.tgries.de/agrep/";
29 license = licenses.isc;
30 platforms = with platforms; linux ++ darwin;