Merge pull request #91458 from mdlayher/mdl-corerad-0.2.7

corerad: 0.2.6 -> 0.2.7
This commit is contained in:
zowoq 2020-06-26 09:45:59 +10:00 committed by GitHub
commit 29b75dc074
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 8 deletions

View File

@ -77,6 +77,8 @@ in {
AmbientCapabilities = "CAP_NET_ADMIN CAP_NET_RAW";
NoNewPrivileges = true;
DynamicUser = true;
Type = "notify";
NotifyAccess = "main";
ExecStart = "${getBin cfg.package}/bin/corerad -c=${cfg.configFile}";
Restart = "on-failure";
};

View File

@ -1,24 +1,34 @@
{ stdenv, buildGoModule, fetchFromGitHub }:
{ stdenv, buildGoModule, fetchFromGitHub, nixosTests }:
buildGoModule rec {
pname = "corerad";
version = "0.2.6";
version = "0.2.7";
src = fetchFromGitHub {
owner = "mdlayher";
repo = "corerad";
rev = "v${version}";
sha256 = "16rwydvqkzi0jlgwpl3d4f8zd35y4lv4h5xa30ybqmwwp1k5ymf0";
sha256 = "073hjbwra8ihh11ha5ajqq2r98cc5li4k0xs4p4s055q197zj3aa";
};
vendorSha256 = "1431fvi9b0id3zhgkxhiampc5avvp998lncyd5l2gn5py3qz6sdl";
vendorSha256 = "19hp8xqr50v8h9vblihalvkb9ll8c0v4p071j9j1zkbjhnb07rca";
buildFlagsArray = ''
-ldflags=
-X github.com/mdlayher/corerad/internal/build.linkTimestamp=1591474872
-X github.com/mdlayher/corerad/internal/build.linkVersion=v${version}
# Since the tarball pulled from GitHub doesn't contain git tag information,
# we fetch the expected tag's timestamp from a file in the root of the
# repository.
preBuild = ''
buildFlagsArray=(
-ldflags="
-X github.com/mdlayher/corerad/internal/build.linkTimestamp=$(<.gittagtime)
-X github.com/mdlayher/corerad/internal/build.linkVersion=v${version}
"
)
'';
passthru.tests = {
inherit (nixosTests) corerad;
};
meta = with stdenv.lib; {
homepage = "https://github.com/mdlayher/corerad";
description = "CoreRAD extensible and observable IPv6 NDP RA daemon";