Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 fetchFromGitHub, 4 buildGoModule, 5}: 6buildGoModule rec { 7 pname = "juicity"; 8 version = "0.5.0"; 9 10 src = fetchFromGitHub { 11 owner = "juicity"; 12 repo = "juicity"; 13 rev = "v${version}"; 14 hash = "sha256-CFytPXfmGNfKDbyYuMCr+4HiH37f28cTmng+XgnO6T0="; 15 }; 16 17 vendorHash = "sha256-kToWZCk6xAAj+t/elO9U5itoOBQ2J9sLcmzz+nNdBHg="; 18 19 proxyVendor = true; 20 21 ldflags = [ 22 "-X=github.com/juicity/juicity/config.Version=${version}" 23 ]; 24 25 subPackages = [ 26 "cmd/server" 27 "cmd/client" 28 ]; 29 30 postInstall = '' 31 mv $out/bin/client $out/bin/juicity-client 32 mv $out/bin/server $out/bin/juicity-server 33 install -Dm444 install/juicity-server.service $out/lib/systemd/system/juicity-server.service 34 install -Dm444 install/juicity-client.service $out/lib/systemd/system/juicity-client.service 35 substituteInPlace $out/lib/systemd/system/juicity-server.service \ 36 --replace /usr/bin/juicity-server $out/bin/juicity-server 37 substituteInPlace $out/lib/systemd/system/juicity-client.service \ 38 --replace /usr/bin/juicity-client $out/bin/juicity-client 39 ''; 40 41 meta = with lib; { 42 homepage = "https://github.com/juicity/juicity"; 43 description = "Quic-based proxy protocol"; 44 license = licenses.agpl3Only; 45 maintainers = with maintainers; [ oluceps ]; 46 }; 47}