about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTom Herbers <mail@tomherbers.de>2024-01-24 16:27:43 +0100
committergithub-actions[bot] <github-actions[bot]@users.noreply.github.com>2024-01-25 09:30:50 +0000
commit7b7b03350f1269e9a49b0f732a10165bd809f327 (patch)
treee3101b7225c05dc18055adec1203e3328bd09dbc
parent759efce8aafcfe775f3e8f5d9729b17a83731967 (diff)
yanic: init at 1.5.0
Co-authored-by: h7x4 <h7x4@nani.wtf>
(cherry picked from commit a83e82c4e9b02f3686b66701915cd35ef1a5e358)
-rw-r--r--pkgs/by-name/ya/yanic/package.nix39
1 files changed, 39 insertions, 0 deletions
diff --git a/pkgs/by-name/ya/yanic/package.nix b/pkgs/by-name/ya/yanic/package.nix
new file mode 100644
index 0000000000000..f2cbbaa739012
--- /dev/null
+++ b/pkgs/by-name/ya/yanic/package.nix
@@ -0,0 +1,39 @@
+{ lib
+, buildGoModule
+, fetchFromGitHub
+, installShellFiles
+}:
+
+buildGoModule rec {
+  pname = "yanic";
+  version = "1.5.0";
+
+  src = fetchFromGitHub {
+    owner = "FreifunkBremen";
+    repo = "yanic";
+    rev = "v${version}";
+    sha256 = "sha256-++tF6nTFIDeqWSqlBDXw/zEfl5YYa4ufzVZaUG2c8Zo=";
+  };
+
+  vendorHash = "sha256-D9V53/+C/+iv1U4kVrYWzJ8iD0MA1QcR8f5ifejFhLo=";
+
+  ldflags = [ "-s" "-w" ];
+
+  nativeBuildInputs = [ installShellFiles ];
+
+  postInstall = ''
+    installShellCompletion --cmd yanic \
+      --bash <($out/bin/yanic completion bash) \
+      --fish <($out/bin/yanic completion fish) \
+      --zsh <($out/bin/yanic completion zsh)
+  '';
+
+  meta = with lib; {
+    description = "A tool to collect and aggregate respondd data";
+    homepage = "https://github.com/FreifunkBremen/yanic";
+    changelog = "https://github.com/FreifunkBremen/yanic/releases/tag/${src.rev}";
+    license = licenses.agpl3Only;
+    maintainers = with maintainers; [ herbetom ];
+    mainProgram = "yanic";
+  };
+}