about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/audio/catnip/default.nix
blob: de8a609dfd6187a9be5b92dcf5e2889e950c9486 (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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
{ lib
, buildGoModule
, fetchFromGitHub
, pkg-config
, portaudio
, testers
, catnip
}:

buildGoModule rec {
  pname = "catnip";
  version = "1.8.0";

  src = fetchFromGitHub {
    owner = "noriah";
    repo = "catnip";
    rev = "v${version}";
    hash = "sha256-eVEoQrI8NycEV/dPUNFqkzgjOYaGmH1+lLRRkOybXDU=";
  };

  vendorHash = "sha256-Hj453+5fhbUL6YMeupT5D6ydaEMe+ZQNgEYHtCUtTx4=";

  nativeBuildInputs = [
    pkg-config
  ];

  buildInputs = [
    portaudio
  ];

  ldflags = [
    "-s"
    "-w"
    "-X=main.version=${version}"
  ];

  passthru.tests = {
    version = testers.testVersion {
      package = catnip;
    };
  };

  meta = with lib; {
    description = "Terminal audio visualizer for linux/unix/macOS/windows";
    homepage = "https://github.com/noriah/catnip";
    changelog = "https://github.com/noriah/catnip/releases/tag/${src.rev}";
    license = licenses.mit;
    maintainers = with maintainers; [ figsoda ];
    mainProgram = "catnip";
  };
}