about summary refs log tree commit diff
path: root/pkgs/by-name/tt/tt/package.nix
blob: f45376aa4caa0d89590672b5c19a3ee539c0e21e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{
  lib,
  fetchFromGitHub,
  buildGoModule,
  installShellFiles,
}:

buildGoModule rec {
  pname = "tt";
  version = "0.4.2";

  src = fetchFromGitHub {
    owner = "lemnos";
    repo = "tt";
    rev = "v${version}";
    hash = "sha256-vKh19xYBeNqvVFilvA7NeQ34RM5VnwDs+Hu/pe3J0y4=";
  };

  vendorHash = "sha256-edY2CcZXOIed0+7IA8kr4lAfuSJx/nHtmc734XzT4z4=";

  nativeBuildInputs = [ installShellFiles ];

  postInstall = ''
      mv $out/bin/src $out/bin/tt
      installManPage tt.1.gz
  '';

  meta = {
    description = "Typing test in the terminal written in Go";
    homepage = "https://github.com/lemnos/tt";
    license = lib.licenses.mit;
    mainProgram = "tt";
    maintainers = with lib.maintainers; [ vinetos ];
  };
}