mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-16 18:03:59 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
47 lines
1.3 KiB
Nix
47 lines
1.3 KiB
Nix
{ lib
|
|
, fetchFromGitHub
|
|
, buildGoModule
|
|
}:
|
|
buildGoModule rec {
|
|
pname = "juicity";
|
|
version = "0.4.3";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "juicity";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
hash = "sha256-4sej/nb7d58+hSCaD6KIfDsqiGmgECPIbRKR65TbMBM=";
|
|
};
|
|
|
|
vendorHash = "sha256-SM5ZrTtuqenPsGjphkCM9JHzucw0/qBmevD+3/kyF6k=";
|
|
|
|
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 = "Quic-based proxy protocol";
|
|
license = licenses.agpl3Only;
|
|
maintainers = with maintainers; [ oluceps ];
|
|
};
|
|
}
|