about summary refs log tree commit diff
path: root/pkgs/tools
diff options
context:
space:
mode:
authorDhananjay Balan <mail@dbalan.in>2022-08-31 13:36:29 +0200
committerDhananjay Balan <mail@dbalan.in>2022-10-06 10:33:44 +0200
commitf550503e68b579daf7c61c9323c49b6696aa6f25 (patch)
treeb76a8177522d321f0d752e12d3c9b797207e4ae3 /pkgs/tools
parentc0a4495169ac65e87a52be632e675965ca4203c6 (diff)
wander: 0.7.0 -> 0.8.0
Diffstat (limited to 'pkgs/tools')
-rw-r--r--pkgs/tools/admin/wander/default.nix32
1 files changed, 28 insertions, 4 deletions
diff --git a/pkgs/tools/admin/wander/default.nix b/pkgs/tools/admin/wander/default.nix
index f215deacac996..5eda08a6b1c88 100644
--- a/pkgs/tools/admin/wander/default.nix
+++ b/pkgs/tools/admin/wander/default.nix
@@ -1,17 +1,41 @@
-{ buildGoModule, fetchFromGitHub, lib }:
+{ wander, buildGoModule, fetchFromGitHub, fetchpatch, installShellFiles, lib, testers }:
 
 buildGoModule rec {
   pname = "wander";
-  version = "0.7.0";
+  version = "0.8.0";
 
   src = fetchFromGitHub {
     owner = "robinovitch61";
     repo = pname;
     rev = "v${version}";
-    sha256 = "sha256-aQqJDUDYHoUZ6ixnY3lmFOx29QpRRke5XHFIpsA+Bnw=";
+    sha256 = "sha256-G/TrfnmEyomdUCN5nUS9v5iqeUzgZzMLUZnfroQLZuk=";
   };
 
-  vendorSha256 = "sha256-T+URnRLumXFz48go9TN0Wha99T03OWGfDK7cQ+zKeRI=";
+  vendorSha256 = "sha256-iTaZ5/0UrLJ3JE3FwQpvjKKrhqklG4n1WFTJhWfj/rI=";
+
+  patches = [
+    (fetchpatch {
+      url = "https://github.com/robinovitch61/wander/commit/b3d3249541de005404a41c17a15218a4f73f68e5.patch";
+      sha256 = "sha256-z8bdSFcAqnwEu0gupxW/L1o/asyxbvTYIdtLZNmQpz8=";
+    })
+  ];
+
+  ldflags = [ "-X github.com/robinovitch61/wander/cmd.Version=v${version}" ];
+
+  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}";
+  };
 
   meta = with lib; {
     description = "Terminal app/TUI for HashiCorp Nomad";