mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-23 06:03:40 +00:00
33 lines
983 B
Nix
33 lines
983 B
Nix
{ lib, buildGoModule, fetchFromGitHub }:
|
|
|
|
buildGoModule rec {
|
|
pname = "krelay";
|
|
version = "0.0.4";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "knight42";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "sha256-NAIRzHWXD4z6lpwi+nVVoCIzfWdaMdrWwht24KgQh3c=";
|
|
};
|
|
|
|
vendorSha256 = "sha256-1/zy5gz1wvinwzRjjhvrIHdjO/Jy/ragqM5QQaAajXI=";
|
|
|
|
subPackages = [ "cmd/client" ];
|
|
|
|
ldflags = [ "-s" "-w" "-X github.com/knight42/krelay/pkg/constants.ClientVersion=${version}" ];
|
|
|
|
postInstall = ''
|
|
mv $out/bin/client $out/bin/kubectl-relay
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "A better alternative to `kubectl port-forward` that can forward TCP or UDP traffic to IP/Host which is accessible inside the cluster.";
|
|
homepage = "https://github.com/knight42/krelay";
|
|
changelog = "https://github.com/knight42/krelay/releases/tag/v${version}";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ ivankovnatsky ];
|
|
mainProgram = "kubectl-relay";
|
|
};
|
|
}
|