bottom: add gpu recognition, new apple sdk, refactor (#360568)
[NixPkgs.git] / pkgs / by-name / kr / krelay / package.nix
blob6390e08d1f54adba988bb8ce7d2ba7606ae4fd21
2   lib,
3   buildGoModule,
4   fetchFromGitHub,
5 }:
7 buildGoModule rec {
8   pname = "krelay";
9   version = "0.1.2";
11   src = fetchFromGitHub {
12     owner = "knight42";
13     repo = pname;
14     rev = "v${version}";
15     hash = "sha256-TonkGh4j+xLGgSpspCedg6c2NpIZIzp5pv8VtWFssPk=";
16   };
18   vendorHash = "sha256-Qz3q/503A5QmsgEaDqChxS2tcUEJGmeT6YE6R3LBbcY=";
20   subPackages = [ "cmd/client" ];
22   ldflags = [
23     "-s"
24     "-w"
25     "-X github.com/knight42/krelay/pkg/constants.ClientVersion=${version}"
26   ];
28   postInstall = ''
29     mv $out/bin/client $out/bin/kubectl-relay
30   '';
32   meta = with lib; {
33     description = "Drop-in replacement for `kubectl port-forward` with some enhanced features";
34     homepage = "https://github.com/knight42/krelay";
35     changelog = "https://github.com/knight42/krelay/releases/tag/v${version}";
36     license = licenses.mit;
37     maintainers = with maintainers; [ ivankovnatsky ];
38     mainProgram = "kubectl-relay";
39   };