2023-10-09 19:29:22 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, buildGoModule
|
|
|
|
, fuse
|
|
|
|
}:
|
2021-05-20 23:08:51 +00:00
|
|
|
|
2023-10-09 19:29:22 +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-05-20 23:08:51 +00:00
|
|
|
buildGoModule rec {
|
|
|
|
pname = "telepresence2";
|
2024-01-25 14:12:00 +00:00
|
|
|
version = "2.17.0";
|
2021-05-20 23:08:51 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "telepresenceio";
|
|
|
|
repo = "telepresence";
|
|
|
|
rev = "v${version}";
|
2024-01-25 14:12:00 +00:00
|
|
|
hash = "sha256-wmoOBoMjPCNJGg86Cl2V4izZQDiZjNzwErvWMYY1MGk=";
|
2021-05-20 23:08:51 +00:00
|
|
|
};
|
|
|
|
|
2023-10-09 19:29:22 +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-12-06 16:07:01 +00:00
|
|
|
preBuild = ''
|
2023-10-09 19:29:22 +00:00
|
|
|
cp ${fuseftp}/bin/main ./pkg/client/remotefs/fuseftp.bits
|
|
|
|
export CGO_ENABLED=0
|
2021-12-06 16:07:01 +00:00
|
|
|
'';
|
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
vendorHash = "sha256-rTlMd56iBSBLTRYJlKHWmYyyeBtNk2WQ3hrPJl9dMYI=";
|
2021-05-20 23:08:51 +00:00
|
|
|
|
2021-08-27 14:25:00 +00:00
|
|
|
ldflags = [
|
|
|
|
"-s" "-w" "-X=github.com/telepresenceio/telepresence/v2/pkg/version.Version=${src.rev}"
|
|
|
|
];
|
2021-05-20 23:08:51 +00:00
|
|
|
|
|
|
|
subPackages = [ "cmd/telepresence" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Local development against a remote Kubernetes or OpenShift cluster";
|
2022-08-12 12:06:08 +00:00
|
|
|
homepage = "https://telepresence.io";
|
2021-05-20 23:08:51 +00:00
|
|
|
license = licenses.asl20;
|
2023-10-09 19:29:22 +00:00
|
|
|
maintainers = with maintainers; [ mausch vilsol ];
|
2022-04-27 09:35:20 +00:00
|
|
|
mainProgram = "telepresence";
|
2021-05-20 23:08:51 +00:00
|
|
|
};
|
|
|
|
}
|