1{ lib
2, buildGoModule
3, fetchFromGitHub
4, installShellFiles
5}:
6
7buildGoModule rec {
8 pname = "topfew";
9 version = "0.9.0";
10
11 src = fetchFromGitHub {
12 owner = "timbray";
13 repo = "topfew";
14 rev = version;
15 hash = "sha256-6ydi/4LyqTLKpR00f4zpcrTnCorlhnsBOxdhzBMNcRI=";
16 };
17
18 vendorHash = null;
19
20 nativeBuildInputs = [
21 installShellFiles
22 ];
23
24 ldflags = [ "-s" "-w" ];
25
26 postInstall = ''
27 installManPage doc/tf.1
28 '';
29
30 meta = with lib; {
31 description = "Finds the fields (or combinations of fields) which appear most often in a stream of records";
32 homepage = "https://github.com/timbray/topfew";
33 license = licenses.gpl3Only;
34 maintainers = with maintainers; [ figsoda ];
35 mainProgram = "tf";
36 };
37}