nixpkgs/pkgs/tools/networking/telepresence2/default.nix
Fabián Heredia Montiel ff323ed355 treewide: vendorSha256 → vendorHash
via: `find pkgs/ -type f -exec sed -i 's/vendorSha256 = "sha256/vendorHash = "sha256/' {};`
2023-09-13 01:03:44 -06:00

40 lines
1.2 KiB
Nix

{ lib, buildGoModule, fetchFromGitHub, kubernetes-helm }:
buildGoModule rec {
pname = "telepresence2";
version = "2.6.4";
src = fetchFromGitHub {
owner = "telepresenceio";
repo = "telepresence";
rev = "v${version}";
sha256 = "sha256-AZW58L0971GVnvafecHfVg3MWr/xGHi4ptycXcV63Fg=";
};
# 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}
'';
vendorHash = "sha256-aa40+6cjpA6/bqpFiqayCkX0PBToPmsp99ykv6e7Huc=";
ldflags = [
"-s" "-w" "-X=github.com/telepresenceio/telepresence/v2/pkg/version.Version=${src.rev}"
];
subPackages = [ "cmd/telepresence" ];
meta = with lib; {
description = "Local development against a remote Kubernetes or OpenShift cluster";
homepage = "https://telepresence.io";
license = licenses.asl20;
maintainers = with maintainers; [ mausch ];
mainProgram = "telepresence";
};
}