about summary refs log tree commit diff
path: root/pkgs/applications/networking/cluster/kube-router
diff options
context:
space:
mode:
authorAaron Jheng <wentworth@outlook.com>2022-05-01 07:57:08 +0000
committerAaron Jheng <wentworth@outlook.com>2022-05-16 00:12:18 +0000
commitbf8d954594690e9dd92df738813ad36f072777a1 (patch)
treef6bbee12156bfacc913b26ba6e12a617a56297de /pkgs/applications/networking/cluster/kube-router
parentd595d207baa598ca62a2da003a96510529fec9e4 (diff)
kube-router: 1.2.2 -> 1.4.0
Diffstat (limited to 'pkgs/applications/networking/cluster/kube-router')
-rw-r--r--pkgs/applications/networking/cluster/kube-router/default.nix26
1 files changed, 18 insertions, 8 deletions
diff --git a/pkgs/applications/networking/cluster/kube-router/default.nix b/pkgs/applications/networking/cluster/kube-router/default.nix
index b9a282b5cd161..c74fdbc749d47 100644
--- a/pkgs/applications/networking/cluster/kube-router/default.nix
+++ b/pkgs/applications/networking/cluster/kube-router/default.nix
@@ -1,23 +1,33 @@
-{ lib, buildGoPackage, fetchFromGitHub }:
+{ lib, buildGoModule, fetchFromGitHub, testers, kube-router }:
 
-buildGoPackage rec {
+buildGoModule rec {
   pname = "kube-router";
-  version = "1.2.2";
-
-  goPackagePath = "github.com/cloudnativelabs/kube-router";
+  version = "1.4.0";
 
   src = fetchFromGitHub {
     owner = "cloudnativelabs";
     repo = pname;
     rev = "v${version}";
-    sha256 = "sha256-/VToLQexvRtcBU+k8WnGEcfLfxme/hgRnhU8723BEFU=";
+    sha256 = "sha256-WBnJPCZHtJWckoFvE8e+eAa2EC/RA7yOMlW+Cemw53Q=";
   };
 
+  vendorSha256 = "sha256-5co+288KZf/dx/jZ7xIGh6kxuW3DdbpAsrZgYob3nWk=";
+
+  CGO_ENABLED = 0;
+
   ldflags = [
-    "-X ${goPackagePath}/pkg/cmd.version=${version}"
-    "-X ${goPackagePath}/pkg/cmd.buildDate=Nix"
+    "-s"
+    "-w"
+    "-X github.com/cloudnativelabs/kube-router/pkg/version.Version=${version}"
+    "-X github.com/cloudnativelabs/kube-router/pkg/version.BuildDate=Nix"
   ];
 
+  checkFlags = [ "-short" ];
+
+  passthru.tests.version = testers.testVersion {
+    package = kube-router;
+  };
+
   meta = with lib; {
     homepage = "https://www.kube-router.io/";
     description = "All-in-one router, firewall and service proxy for Kubernetes";