nixpkgs-suyu/pkgs/tools/networking/telepresence2/default.nix

39 lines
1.2 KiB
Nix
Raw Normal View History

2021-11-04 21:43:27 +01:00
{ lib, buildGoModule, fetchFromGitHub, kubernetes-helm }:
2021-04-10 18:54:43 +02:00
buildGoModule rec {
pname = "telepresence2";
2021-11-04 21:43:27 +01:00
version = "2.4.6";
2021-04-10 18:54:43 +02:00
src = fetchFromGitHub {
owner = "telepresenceio";
repo = "telepresence";
rev = "v${version}";
2021-11-04 21:43:27 +01:00
sha256 = "09w7yk7jk5m6clq3drbgdr61w60b21jmfd635brfahms8pykmmzl";
2021-04-10 18:54:43 +02:00
};
2021-11-04 21:43:27 +01:00
# The Helm chart is go:embed'ed as a tarball in the binary.
# That tarball is generated by running ./build-aux/package_embedded_chart/main.go,
# which tries to invoke helm from tools/bin/helm.
# Oh well…
preBuild = ''
mkdir -p tools/bin
ln -sfn ${kubernetes-helm}/bin/helm tools/bin/helm
go run ./build-aux/package_embedded_chart/main.go ${src.rev}
'';
vendorSha256 = "0przkcqaf56a0sgan2xxqfpbs9nbmq4brwdv1qnag7i9myzvixxb";
2021-04-10 18:54:43 +02:00
2021-08-26 08:45:51 +02:00
ldflags = [
"-s" "-w" "-X=github.com/telepresenceio/telepresence/v2/pkg/version.Version=${src.rev}"
];
2021-04-10 18:54:43 +02:00
subPackages = [ "cmd/telepresence" ];
meta = with lib; {
description = "Local development against a remote Kubernetes or OpenShift cluster";
homepage = "https://www.getambassador.io/docs/telepresence/2.1/quick-start/";
license = licenses.asl20;
maintainers = with maintainers; [ mausch ];
};
}