nixpkgs/pkgs/tools/admin/wander/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

40 lines
1.1 KiB
Nix
Raw Normal View History

2022-12-11 18:35:32 +00:00
{ lib, buildGoModule, fetchFromGitHub, installShellFiles, testers, wander }:
2022-07-11 01:30:23 +00:00
buildGoModule rec {
pname = "wander";
2022-12-11 00:51:45 +00:00
version = "0.8.2";
2022-07-11 01:30:23 +00:00
src = fetchFromGitHub {
owner = "robinovitch61";
repo = pname;
rev = "v${version}";
2022-12-11 00:51:45 +00:00
sha256 = "sha256-BcjK1GNj6URk6PmZIqG/t6vvy5ZXo3Z6wDqY1kbLSfw=";
2022-07-11 01:30:23 +00:00
};
2022-08-31 11:36:29 +00:00
vendorSha256 = "sha256-iTaZ5/0UrLJ3JE3FwQpvjKKrhqklG4n1WFTJhWfj/rI=";
2022-12-11 18:35:32 +00:00
ldflags = [ "-s" "-w" "-X=github.com/robinovitch61/wander/cmd.Version=v${version}" ];
2022-08-31 11:36:29 +00:00
nativeBuildInputs = [ installShellFiles ];
postInstall = ''
installShellCompletion --cmd wander \
--fish <($out/bin/wander completion fish) \
--bash <($out/bin/wander completion bash) \
--zsh <($out/bin/wander completion zsh)
'';
passthru.tests.version = testers.testVersion {
package = wander;
command = "wander --version";
version = "v${version}";
};
2022-07-11 01:30:23 +00:00
meta = with lib; {
description = "Terminal app/TUI for HashiCorp Nomad";
license = licenses.mit;
homepage = "https://github.com/robinovitch61/wander";
maintainers = teams.c3d2.members;
};
}