about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/networking/cluster/hubble/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/networking/cluster/hubble/default.nix')
-rw-r--r--nixpkgs/pkgs/applications/networking/cluster/hubble/default.nix32
1 files changed, 29 insertions, 3 deletions
diff --git a/nixpkgs/pkgs/applications/networking/cluster/hubble/default.nix b/nixpkgs/pkgs/applications/networking/cluster/hubble/default.nix
index 172f866c48ab..e6e5e6c1ce6c 100644
--- a/nixpkgs/pkgs/applications/networking/cluster/hubble/default.nix
+++ b/nixpkgs/pkgs/applications/networking/cluster/hubble/default.nix
@@ -1,8 +1,8 @@
-{ lib, buildGoModule, fetchFromGitHub }:
+{ stdenv, lib, buildGoModule, fetchFromGitHub, installShellFiles }:
 
 buildGoModule rec {
   pname = "hubble";
-  version = "0.9.0";
+  version = "0.10.0";
 
   src = fetchFromGitHub {
     owner = "cilium";
@@ -13,10 +13,36 @@ buildGoModule rec {
 
   vendorSha256 = null;
 
+  ldflags = [
+    "-s" "-w"
+    "-X github.com/cilium/hubble/pkg.GitBranch=none"
+    "-X github.com/cilium/hubble/pkg.GitHash=none"
+    "-X github.com/cilium/hubble/pkg.Version=${version}"
+  ];
+
+  # Test fails at Test_getFlowsRequestWithInvalidRawFilters in github.com/cilium/hubble/cmd/observe
+  # https://github.com/NixOS/nixpkgs/issues/178976
+  # https://github.com/cilium/hubble/pull/656
+  # https://github.com/cilium/hubble/pull/655
+  doCheck = false;
+  doInstallCheck = true;
+  installCheckPhase = ''
+    $out/bin/hubble version | grep ${version} > /dev/null
+  '';
+
+  nativeBuildInputs = [ installShellFiles ];
+  postInstall = ''
+    installShellCompletion --cmd hubble \
+      --bash <($out/bin/hubble completion bash) \
+      --fish <($out/bin/hubble completion fish) \
+      --zsh <($out/bin/hubble completion zsh)
+  '';
+
   meta = with lib; {
+    broken = (stdenv.isLinux && stdenv.isAarch64) || stdenv.isDarwin;
     description = "Network, Service & Security Observability for Kubernetes using eBPF";
     license = licenses.asl20;
     homepage = "https://github.com/cilium/hubble/";
-    maintainers = with maintainers; [ humancalico ];
+    maintainers = with maintainers; [ humancalico bryanasdev000 ];
   };
 }