nixpkgs/pkgs/applications/networking/cluster/krelay/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

33 lines
983 B
Nix
Raw Normal View History

2022-03-29 14:17:35 +00:00
{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "krelay";
2022-07-28 18:03:03 +00:00
version = "0.0.4";
2022-03-29 14:17:35 +00:00
src = fetchFromGitHub {
owner = "knight42";
repo = pname;
rev = "v${version}";
2022-07-28 18:03:03 +00:00
sha256 = "sha256-NAIRzHWXD4z6lpwi+nVVoCIzfWdaMdrWwht24KgQh3c=";
2022-03-29 14:17:35 +00:00
};
2022-07-28 18:03:03 +00:00
vendorSha256 = "sha256-1/zy5gz1wvinwzRjjhvrIHdjO/Jy/ragqM5QQaAajXI=";
2022-03-29 14:17:35 +00:00
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";
2022-03-29 14:17:35 +00:00
};
}