about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/networking/cluster/tektoncd-cli/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/networking/cluster/tektoncd-cli/default.nix')
-rw-r--r--nixpkgs/pkgs/applications/networking/cluster/tektoncd-cli/default.nix33
1 files changed, 20 insertions, 13 deletions
diff --git a/nixpkgs/pkgs/applications/networking/cluster/tektoncd-cli/default.nix b/nixpkgs/pkgs/applications/networking/cluster/tektoncd-cli/default.nix
index a2bb9da68054..581af59f0c8f 100644
--- a/nixpkgs/pkgs/applications/networking/cluster/tektoncd-cli/default.nix
+++ b/nixpkgs/pkgs/applications/networking/cluster/tektoncd-cli/default.nix
@@ -2,30 +2,37 @@
 
 buildGoModule rec {
   pname = "tektoncd-cli";
-  version = "0.15.0";
+  version = "0.16.0";
 
   src = fetchFromGitHub {
     owner = "tektoncd";
     repo = "cli";
     rev = "v${version}";
-    sha256 = "0xb2zlpkh9cwinp6zj2jpv4wlws042ad1fa0wkcnnkh0vjm6mnrl";
+    sha256 = "sha256-IY9iJa4HcZ60jDPdP47jjC0FiOJesvf2vEENMAYVd4Q=";
   };
 
   vendorSha256 = null;
 
-  doCheck = false;
+  buildFlagsArray = [
+    "-ldflags="
+    "-s"
+    "-w"
+    "-X github.com/tektoncd/cli/pkg/cmd/version.clientVersion=${version}"
+  ];
 
   nativeBuildInputs = [ installShellFiles ];
 
-  buildPhase = ''
-    make bin/tkn
-  '';
+  # third_party/VENDOR-LICENSE breaks build/check as go files are still included
+  # docs is a tool for generating docs
+  excludedPackages = "\\(third_party\\|cmd/docs\\)";
 
-  installPhase = ''
-    install bin/tkn -Dt $out/bin
+  preCheck = ''
+    # Change the golden files to match our desired version
+    sed -i "s/dev/${version}/" pkg/cmd/version/testdata/TestGetVersions-*.golden
+  '';
 
-    mkdir -p "$out/share/man/man1"
-    cp docs/man/man1/* "$out/share/man/man1"
+  postInstall = ''
+    installManPage docs/man/man1/*
 
     installShellCompletion --cmd tkn \
       --bash <($out/bin/tkn completion bash) \
@@ -34,14 +41,14 @@ buildGoModule rec {
   '';
 
   meta = with lib; {
-    description = "The Tekton Pipelines cli project provides a CLI for interacting with Tekton";
     homepage = "https://tekton.dev";
+    changelog = "https://github.com/tektoncd/cli/releases/tag/v${version}";
+    description = "Provides a CLI for interacting with Tekton";
     longDescription = ''
       The Tekton Pipelines cli project provides a CLI for interacting with Tekton!
       For your convenience, it is recommended that you install the Tekton CLI, tkn, together with the core component of Tekton, Tekton Pipelines.
     '';
     license = licenses.asl20;
-    maintainers = with maintainers; [ jk mstrangfeld ];
-    platforms = platforms.linux ++ platforms.darwin;
+    maintainers = with maintainers; [ jk mstrangfeld vdemeester ];
   };
 }