depot/third_party/nixpkgs/pkgs/tools/networking/juicity/default.nix
Default email d5f4a57cbf Project import generated by Copybara.
GitOrigin-RevId: ce5e4a6ef2e59d89a971bc434ca8ca222b9c7f5e
2023-08-10 09:59:29 +02:00

46 lines
1.3 KiB
Nix

{ lib
, fetchFromGitHub
, buildGoModule
}:
buildGoModule rec {
pname = "juicity";
version = "0.1.2";
src = fetchFromGitHub {
owner = "juicity";
repo = pname;
rev = "v${version}";
hash = "sha256-k6rx55AxdUWEdnqsTj0Xq9gafx0TCdziNcf61nz//Z8=";
};
vendorHash = "sha256-cUbN5/MHawzzQZgrdnt28yRtPClTdIUJZm1GjcWf0dI=";
proxyVendor = true;
ldflags = [
"-X=github.com/juicity/juicity/config.Version=${version}"
];
subPackages = [
"cmd/server"
"cmd/client"
];
postInstall = ''
mv $out/bin/client $out/bin/juicity-client
mv $out/bin/server $out/bin/juicity-server
install -Dm444 install/juicity-server.service $out/lib/systemd/system/juicity-server.service
install -Dm444 install/juicity-client.service $out/lib/systemd/system/juicity-client.service
substituteInPlace $out/lib/systemd/system/juicity-server.service \
--replace /usr/bin/juicity-server $out/bin/juicity-server
substituteInPlace $out/lib/systemd/system/juicity-client.service \
--replace /usr/bin/juicity-client $out/bin/juicity-client
'';
meta = with lib; {
homepage = "https://github.com/juicity/juicity";
description = "A quic-based proxy protocol";
license = licenses.agpl3Only;
maintainers = with maintainers; [ oluceps ];
};
}