From a43657841b208072c98b4623bfa093fdb595f278 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Thu, 9 Nov 2017 10:40:51 +0100 Subject: [PATCH] feat(pkgs): Add stern-bin package --- packages.nix | 3 ++- pkgs/stern-bin.nix | 25 +++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 pkgs/stern-bin.nix diff --git a/packages.nix b/packages.nix index 1ba08c2e7..2e1d267cb 100644 --- a/packages.nix +++ b/packages.nix @@ -73,8 +73,9 @@ in { (import pkgs/kontemplate.nix) (import pkgs/mq-cli.nix) (import pkgs/nixfd.nix) - (import pkgs/terraform-bin.nix) (import pkgs/pulseaudio-ctl.nix) + (import pkgs/stern-bin.nix) + (import pkgs/terraform-bin.nix) ]; } diff --git a/pkgs/stern-bin.nix b/pkgs/stern-bin.nix new file mode 100644 index 000000000..27cadcb51 --- /dev/null +++ b/pkgs/stern-bin.nix @@ -0,0 +1,25 @@ +with import {}; + +stdenv.mkDerivation rec { + name = "stern-${version}"; + version = "1.5.1"; + + src = fetchurl { + url = "https://github.com/wercker/stern/releases/download/${version}/stern_linux_amd64"; + sha256 = "0xjxhgi1mlkbqimf0fk5cxr6lvwxrr2z49bnw4b1vqpd1gdqjyiv"; + name = "stern"; + }; + + phases = "installPhase"; + installPhase = '' + mkdir -p $out/bin + cp $src $out/bin/stern + chmod +x $out/bin/stern + ''; + + meta = with stdenv.lib; { + description = "Multi pod and container log tailing for Kubernetes"; + homepage = "https://github.com/wercker/stern"; + }; +} +