From e48164578b9d93663c59bd30fc2efecc8d723344 Mon Sep 17 00:00:00 2001 From: Haseeb Majid Date: Sat, 20 Jul 2024 08:27:18 +0100 Subject: [PATCH] optinix: init at 0.1.1 Co-authored-by: Pol Dellaiera --- pkgs/by-name/op/optinix/package.nix | 36 +++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 pkgs/by-name/op/optinix/package.nix diff --git a/pkgs/by-name/op/optinix/package.nix b/pkgs/by-name/op/optinix/package.nix new file mode 100644 index 000000000000..18d21f17724b --- /dev/null +++ b/pkgs/by-name/op/optinix/package.nix @@ -0,0 +1,36 @@ +{ + lib, + fetchFromGitLab, + buildGoModule, + installShellFiles, +}: +buildGoModule rec { + pname = "optinix"; + version = "0.1.1"; + + src = fetchFromGitLab { + owner = "hmajid2301"; + repo = "optinix"; + rev = "v${version}"; + hash = "sha256-bRHesc03jExIL29BCP93cMbx+BOT4sHCu58JjpmRaeA="; + }; + + vendorHash = "sha256-uSFEhRWvJ83RGpekPJL9MOYJy2NfgVdZxuaNUMq3VaE="; + + nativeBuildInputs = [ installShellFiles ]; + + postInstall = '' + installShellCompletion --cmd optinix \ + --bash <($out/bin/optinix completion bash) \ + --fish <($out/bin/optinix completion fish) \ + --zsh <($out/bin/optinix completion zsh) + ''; + + meta = { + description = "Tool for searching options in Nix"; + homepage = "https://gitlab.com/hmajid2301/optinix"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ hmajid2301 ]; + mainProgram = "optinix"; + }; +}