ripasso-cursive: cosmetic changes (#361736)
[NixPkgs.git] / pkgs / by-name / ab / abbreviate / package.nix
blob2f1e5bc812abd680fea0e367d8bb4fd3e50dc227
1 { lib
2 , buildGoModule
3 , fetchFromGitHub
4 , installShellFiles
5 }:
7 buildGoModule rec {
8   pname = "abbreviate";
9   version = "1.6.0";
11   src = fetchFromGitHub {
12     owner = "dnnrly";
13     repo = "abbreviate";
14     rev = "v${version}";
15     hash = "sha256-foGg+o+BbPsfpph+XHIfyPaknQD1N1rcZW58kgZ5HYM=";
16   };
18   vendorHash = "sha256-9z3M3FEjllNpae+5EcLVkF1rAtOQzUQGebJeU7QsmTA=";
20   nativeBuildInputs = [
21     installShellFiles
22   ];
24   ldflags = [ "-s" "-w" ];
26   postInstall = ''
27     installShellCompletion --cmd abbreviate \
28       --bash <($out/bin/abbreviate completion bash) \
29       --fish <($out/bin/abbreviate completion fish) \
30       --zsh <($out/bin/abbreviate completion zsh)
31   '';
33   meta = with lib; {
34     description = "Shorten your strings using common abbreviations";
35     mainProgram = "abbreviate";
36     homepage = "https://github.com/dnnrly/abbreviate";
37     changelog = "https://github.com/dnnrly/abbreviate/releases/tag/${src.rev}";
38     license = licenses.asl20;
39     maintainers = with maintainers; [ figsoda ];
40   };