Merge pull request #209194 from farcaller/tubekit

tubekit: init at 4
This commit is contained in:
Nick Cao 2023-01-16 16:40:51 +08:00 committed by GitHub
commit 44fa54579e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 47 additions and 0 deletions

View file

@ -0,0 +1,26 @@
{ lib
, buildGoModule
, fetchFromGitHub
}:
buildGoModule rec {
pname = "tubekit";
version = "4";
src = fetchFromGitHub {
owner = "reconquest";
repo = "tubekit";
rev = "refs/tags/v${version}";
hash = "sha256-sq91uR8ITMOv8hivwKQR02mMlJpjDHw6RxiwVUrpwnY=";
};
vendorHash = "sha256-qrGzmr1dZPn5r2WBJA7FT7RTqP2sxnrXgbrnKlnpF0Y=";
meta = with lib; {
description = "Kubectl alternative with quick context switching";
homepage = "https://github.com/reconquest/tubekit";
license = licenses.mit;
platforms = platforms.linux ++ platforms.darwin;
maintainers = with maintainers; [ farcaller ];
};
}

View file

@ -0,0 +1,17 @@
{ lib
, runCommand
, makeWrapper
, tubekit-unwrapped
, pname ? "tubekit"
, version ? tubekit-unwrapped.version
, kubectl
}:
runCommand "${pname}-${version}"
{
inherit pname version;
inherit (tubekit-unwrapped) src meta;
nativeBuildInputs = [ makeWrapper ];
} ''
mkdir -p $out/bin
makeWrapper ${tubekit-unwrapped}/bin/tubectl $out/bin/tubectl --set-default TUBEKIT_KUBECTL ${kubectl}/bin/kubectl
''

View file

@ -38591,4 +38591,8 @@ with pkgs;
jfrog-cli = callPackage ../tools/misc/jfrog-cli { };
ov = callPackage ../tools/text/ov { };
tubekit = callPackage ../applications/networking/cluster/tubekit/wrapper.nix { };
tubekit-unwrapped = callPackage ../applications/networking/cluster/tubekit { };
}