From 18d69a9d14f1b61493bb645a1afd019ae4f8a8cd Mon Sep 17 00:00:00 2001 From: Nadir Ishiguro <23151917+nadir-ishiguro@users.noreply.github.com> Date: Wed, 5 Mar 2025 16:37:07 +0100 Subject: [PATCH] gocatcli: init at 1.0.6 --- pkgs/by-name/go/gocatcli/package.nix | 53 ++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 pkgs/by-name/go/gocatcli/package.nix diff --git a/pkgs/by-name/go/gocatcli/package.nix b/pkgs/by-name/go/gocatcli/package.nix new file mode 100644 index 000000000000..a95949a11023 --- /dev/null +++ b/pkgs/by-name/go/gocatcli/package.nix @@ -0,0 +1,53 @@ +{ + lib, + stdenv, + buildGoModule, + fetchFromGitHub, + installShellFiles, + versionCheckHook, + nix-update-script, +}: + +buildGoModule rec { + pname = "gocatcli"; + version = "1.0.6"; + + src = fetchFromGitHub { + owner = "deadc0de6"; + repo = "gocatcli"; + tag = "v${version}"; + hash = "sha256-qB7BDPDGcngPhd82V4FrsycFd7CNb6hPaHJQ+ECmo48="; + }; + + vendorHash = "sha256-gJfqnxCTKXmTH8L4qjSXzTr+LsP+jzzivfQOplRkfao="; + + nativeBuildInputs = [ installShellFiles ]; + + postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' + installShellCompletion --cmd gocatcli \ + --bash <($out/bin/gocatcli completion bash) \ + --fish <($out/bin/gocatcli completion fish) \ + --zsh <($out/bin/gocatcli completion zsh) + ''; + + nativeCheckInputs = [ versionCheckHook ]; + doCheck = true; + + passthru.updateScript = nix-update-script { }; + + meta = { + homepage = "https://github.com/deadc0de6/gocatcli"; + changelog = "https://github.com/deadc0de6/gocatcli/releases/tag/v${version}"; + description = "The command line catalog tool for your offline data"; + longDescription = '' + gocatcli is a catalog tool for your offline data. It indexes external + media in a catalog file and allows to quickly find specific files or even + navigate in the catalog as if it was a mounted drive + ''; + license = lib.licenses.gpl3Only; + maintainers = with lib.maintainers; [ + nadir-ishiguro + ]; + mainProgram = "gocatcli"; + }; +}