about summary refs log tree commit diff
path: root/pkgs/tools/audio/catnip
diff options
context:
space:
mode:
authorfigsoda <figsoda@pm.me>2023-05-29 22:56:58 -0400
committerfigsoda <figsoda@pm.me>2023-05-29 22:56:58 -0400
commit6519bda964865954344098ffa271f97cf25ed344 (patch)
treef7b7a23a3fd0141a4c59c855829ad54c06578be7 /pkgs/tools/audio/catnip
parentf97bd7fa1f29d9b8b94812e7faf8e5bbf981fffa (diff)
catnip: init at 1.8.0
https://github.com/noriah/catnip
Diffstat (limited to 'pkgs/tools/audio/catnip')
-rw-r--r--pkgs/tools/audio/catnip/default.nix50
1 files changed, 50 insertions, 0 deletions
diff --git a/pkgs/tools/audio/catnip/default.nix b/pkgs/tools/audio/catnip/default.nix
new file mode 100644
index 0000000000000..de299738242e3
--- /dev/null
+++ b/pkgs/tools/audio/catnip/default.nix
@@ -0,0 +1,50 @@
+{ 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 ];
+  };
+}