aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/pkgs/applications/networking/cluster/stern/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'infra/libkookie/nixpkgs/pkgs/applications/networking/cluster/stern/default.nix')
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/networking/cluster/stern/default.nix39
1 files changed, 39 insertions, 0 deletions
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/networking/cluster/stern/default.nix b/infra/libkookie/nixpkgs/pkgs/applications/networking/cluster/stern/default.nix
new file mode 100644
index 000000000000..0f8ed05d8e6a
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/applications/networking/cluster/stern/default.nix
@@ -0,0 +1,39 @@
+{ stdenv, lib, buildPackages, buildGoPackage, fetchFromGitHub, installShellFiles }:
+
+let isCrossBuild = stdenv.hostPlatform != stdenv.buildPlatform; in
+
+buildGoPackage rec {
+ pname = "stern";
+ version = "1.11.0";
+
+ goPackagePath = "github.com/wercker/stern";
+
+ src = fetchFromGitHub {
+ owner = "wercker";
+ repo = "stern";
+ rev = version;
+ sha256 = "0xndlq0ks8flzx6rdd4lnkxpkbvdy9sj1jwys5yj7p989ls8by3n";
+ };
+
+ deleteVendor = true;
+ goDeps = ./deps.nix;
+
+ nativeBuildInputs = [ installShellFiles ];
+
+ postInstall =
+ let stern = if isCrossBuild then buildPackages.stern else "$out"; in
+ ''
+ for shell in bash zsh; do
+ ${stern}/bin/stern --completion $shell > stern.$shell
+ installShellCompletion stern.$shell
+ done
+ '';
+
+ meta = with lib; {
+ description = "Multi pod and container log tailing for Kubernetes";
+ homepage = "https://github.com/wercker/stern";
+ license = licenses.asl20;
+ maintainers = with maintainers; [ mbode ];
+ platforms = platforms.unix;
+ };
+}