1{
2 stdenvNoCC,
3 lib,
4 fetchFromGitHub,
5 bash,
6}:
7
8stdenvNoCC.mkDerivation rec {
9 pname = "kubectl-node-shell";
10 version = "1.11.0";
11
12 src = fetchFromGitHub {
13 owner = "kvaps";
14 repo = "kubectl-node-shell";
15 rev = "v${version}";
16 hash = "sha256-jLwnWp/XS4SOyf5v46DPy2Nc6LatF6AzNvHiGVNpsto=";
17 };
18
19 strictDeps = true;
20 buildInputs = [ bash ];
21
22 installPhase = ''
23 runHook preInstall
24
25 install -m755 ./kubectl-node_shell -D $out/bin/kubectl-node_shell
26
27 runHook postInstall
28 '';
29
30 meta = with lib; {
31 description = "Exec into node via kubectl";
32 mainProgram = "kubectl-node_shell";
33 homepage = "https://github.com/kvaps/kubectl-node-shell";
34 license = licenses.asl20;
35 maintainers = with maintainers; [ jocelynthode ];
36 platforms = platforms.unix;
37 };
38}