mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 19:21:04 +00:00
cunicu: init at 0.5.53 (#354164)
This commit is contained in:
commit
9204be9913
67
pkgs/by-name/cu/cunicu/package.nix
Normal file
67
pkgs/by-name/cu/cunicu/package.nix
Normal file
|
@ -0,0 +1,67 @@
|
|||
{
|
||||
lib,
|
||||
stdenv,
|
||||
buildGoModule,
|
||||
fetchFromGitHub,
|
||||
installShellFiles,
|
||||
protobuf,
|
||||
protoc-gen-go,
|
||||
protoc-gen-go-grpc,
|
||||
}:
|
||||
buildGoModule rec {
|
||||
pname = "cunicu";
|
||||
version = "0.5.53";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "cunicu";
|
||||
repo = "cunicu";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-y8JyXf+LdquhVr9G5wX1LdMF7wpj5PZG3xXGAWoypzA=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
installShellFiles
|
||||
protobuf
|
||||
protoc-gen-go
|
||||
protoc-gen-go-grpc
|
||||
];
|
||||
|
||||
CGO_ENABLED = 0;
|
||||
|
||||
vendorHash = "sha256-OiLVdEf6fcGHx0k0xC5sZwhnK0FiLgfdkz2zNgBbcgY=";
|
||||
|
||||
# These packages contain networking dependent tests which fail in the sandbox
|
||||
excludedPackages = [
|
||||
"pkg/config"
|
||||
"pkg/selfupdate"
|
||||
"pkg/tty"
|
||||
"scripts"
|
||||
];
|
||||
|
||||
ldflags = [
|
||||
"-X cunicu.li/cunicu/pkg/buildinfo.Version=${version}"
|
||||
"-X cunicu.li/cunicu/pkg/buildinfo.BuiltBy=Nix"
|
||||
];
|
||||
|
||||
preBuild = ''
|
||||
go generate ./...
|
||||
'';
|
||||
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
$out/bin/cunicu docs --with-frontmatter
|
||||
installManPage ./docs/usage/man/*.1
|
||||
installShellCompletion --cmd cunicu \
|
||||
--bash <($out/bin/cunicu completion bash) \
|
||||
--zsh <($out/bin/cunicu completion zsh) \
|
||||
--fish <($out/bin/cunicu completion fish)
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Zeroconf peer-to-peer mesh VPN using Wireguard® and Interactive Connectivity Establishment (ICE)";
|
||||
homepage = "https://cunicu.li";
|
||||
license = lib.licenses.asl20;
|
||||
maintainers = with lib.maintainers; [ stv0g ];
|
||||
platforms = lib.platforms.linux;
|
||||
mainProgram = "cunicu";
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue