5e9e1146e1
GitOrigin-RevId: 18036c0be90f4e308ae3ebcab0e14aae0336fe42
46 lines
1.3 KiB
Nix
46 lines
1.3 KiB
Nix
{ lib
|
|
, fetchFromGitHub
|
|
, buildGoModule
|
|
}:
|
|
buildGoModule rec {
|
|
pname = "juicity";
|
|
version = "0.1.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "juicity";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
hash = "sha256-wTMWmHQPJ65FRJUNt7liLF+nM/tXdq067KT0fMWlDfM=";
|
|
};
|
|
|
|
vendorHash = "sha256-RTf0+rf6DPJf9DKRNstZzJbQ3+pU/8siLSRgUo9Bcu8=";
|
|
|
|
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 ];
|
|
};
|
|
}
|