nixpkgs/pkgs/tools/networking/juicity/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

47 lines
1.3 KiB
Nix
Raw Normal View History

2023-07-29 08:48:10 +00:00
{ lib
, fetchFromGitHub
2023-08-27 13:24:59 +00:00
, buildGo121Module
2023-07-29 08:48:10 +00:00
}:
2023-08-27 13:24:59 +00:00
buildGo121Module rec {
2023-07-29 08:48:10 +00:00
pname = "juicity";
2023-09-02 10:23:04 +00:00
version = "0.3.0";
2023-07-29 08:48:10 +00:00
src = fetchFromGitHub {
owner = "juicity";
repo = pname;
rev = "v${version}";
2023-09-02 10:23:04 +00:00
hash = "sha256-UKEmPb5Kn2GlTriXFOavQ5o8bU9VqMzQZx4iyG5W7a0=";
2023-07-29 08:48:10 +00:00
};
2023-09-02 10:23:04 +00:00
vendorHash = "sha256-KLyGgkZqkM8jn+Sqa4IjauvfL9QXp9W/eUcViDTGDtw=";
2023-07-29 08:48:10 +00:00
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 ];
};
}