2023-09-11 13:49:51 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, buildGoModule
|
|
|
|
, fuse
|
|
|
|
}:
|
2021-04-10 16:54:43 +00:00
|
|
|
|
2023-09-11 13:49:51 +00:00
|
|
|
let
|
|
|
|
fuseftp = buildGoModule rec {
|
|
|
|
pname = "go-fuseftp";
|
|
|
|
version = "0.4.2";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "datawire";
|
|
|
|
repo = "go-fuseftp";
|
|
|
|
rev = "v${version}";
|
|
|
|
hash = "sha256-bkaC+EOqFPQA4fDkVhO6EqgGhOJy31yGwVbbPoRd+70=";
|
|
|
|
};
|
|
|
|
|
|
|
|
vendorHash = "sha256-Dk4wvg2lTGTw8vP42+XuvmMXeMluR0SPwlVHLEB8yCQ=";
|
|
|
|
|
|
|
|
buildInputs = [ fuse ];
|
|
|
|
|
|
|
|
ldflags = [ "-s" "-w" ];
|
|
|
|
|
|
|
|
subPackages = [ "pkg/main" ];
|
|
|
|
};
|
|
|
|
in
|
2021-04-10 16:54:43 +00:00
|
|
|
buildGoModule rec {
|
|
|
|
pname = "telepresence2";
|
2024-11-03 10:49:12 +00:00
|
|
|
version = "2.20.2";
|
2021-04-10 16:54:43 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "telepresenceio";
|
|
|
|
repo = "telepresence";
|
|
|
|
rev = "v${version}";
|
2024-11-03 10:49:12 +00:00
|
|
|
hash = "sha256-MwAet+UJ6BNEj6/NYN9HBxTGbw2CS2ASUJQrKtpoV1I=";
|
2021-04-10 16:54:43 +00:00
|
|
|
};
|
|
|
|
|
2023-09-11 13:49:51 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
fuseftp
|
|
|
|
];
|
|
|
|
|
|
|
|
# telepresence depends on fuseftp existing as a built binary, as it gets embedded
|
|
|
|
# CGO gets disabled to match their build process as that is how it's done upstream
|
2021-11-04 20:43:27 +00:00
|
|
|
preBuild = ''
|
2023-09-11 13:49:51 +00:00
|
|
|
cp ${fuseftp}/bin/main ./pkg/client/remotefs/fuseftp.bits
|
|
|
|
export CGO_ENABLED=0
|
2021-11-04 20:43:27 +00:00
|
|
|
'';
|
|
|
|
|
2024-11-03 10:49:12 +00:00
|
|
|
vendorHash = "sha256-i9quHeAb8PCG1KQGKaOkxTxjImiuK6oMJcRI443/mkI=";
|
2021-04-10 16:54:43 +00:00
|
|
|
|
2021-08-26 06:45:51 +00:00
|
|
|
ldflags = [
|
|
|
|
"-s" "-w" "-X=github.com/telepresenceio/telepresence/v2/pkg/version.Version=${src.rev}"
|
|
|
|
];
|
2021-04-10 16:54:43 +00:00
|
|
|
|
|
|
|
subPackages = [ "cmd/telepresence" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Local development against a remote Kubernetes or OpenShift cluster";
|
2022-08-12 00:04:20 +00:00
|
|
|
homepage = "https://telepresence.io";
|
2021-04-10 16:54:43 +00:00
|
|
|
license = licenses.asl20;
|
2023-09-11 13:49:51 +00:00
|
|
|
maintainers = with maintainers; [ mausch vilsol ];
|
2022-04-01 19:34:55 +00:00
|
|
|
mainProgram = "telepresence";
|
2021-04-10 16:54:43 +00:00
|
|
|
};
|
|
|
|
}
|