aboutsummaryrefslogtreecommitdiffhomepage
path: root/pkgs/term-clock/default.nix
blob: ce507fe4dac36445c8e882d282c37341c99f0a09 (plain)
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
36
37
38
{
  lib,
  buildGoModule,
  fetchFromGitHub,
  installShellFiles,
}:

buildGoModule rec {
  pname = "term-clock";
  version = "1.0.0";

  src = fetchFromGitHub {
    owner = "nsfisis";
    repo = "term-clock";
    rev = "v${version}";
    hash = "sha256-IB6AFQpbTVfDbEbTnq4sWTxKHAoNQlmw5tvBl13y4yc=";
  };
  vendorHash = "sha256-NLxaPtxhb67uhs01DASlAIfCIWV1lnuiu+uFmJcxN0U=";

  nativeBuildInputs = [
    installShellFiles
  ];

  postFixup = ''
    installShellCompletion --cmd term-clock \
      --bash <($out/bin/term-clock completion bash) \
      --zsh  <($out/bin/term-clock completion zsh) \
      --fish <($out/bin/term-clock completion fish) \
      ;
  '';

  meta = {
    description = "A clock on your terminal";
    homepage = "https://github.com/nsfisis/term-clock";
    license = lib.licenses.mit;
    mainProgram = "term-clock";
  };
}