2021-01-25 08:26:54 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, nixosTests }:
|
2020-01-02 14:17:09 +00:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "corerad";
|
2021-01-03 12:02:30 +00:00
|
|
|
version = "0.3.0";
|
2020-01-02 14:17:09 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mdlayher";
|
|
|
|
repo = "corerad";
|
|
|
|
rev = "v${version}";
|
2021-01-03 12:02:30 +00:00
|
|
|
sha256 = "1q4wcliifas8xvwy7kcq4fbc1iv7dha3k6j1nbwl7pjqmyggs3f4";
|
2020-01-02 14:17:09 +00:00
|
|
|
};
|
|
|
|
|
2021-01-03 12:02:30 +00:00
|
|
|
vendorSha256 = "07khxs15z9xzcmp4gyggdwqyz361y96h6ib92qax8k83cr0l494p";
|
2020-01-02 14:17:09 +00:00
|
|
|
|
2020-08-04 01:26:27 +01:00
|
|
|
doCheck = false;
|
|
|
|
|
2020-06-25 04:51:22 +01:00
|
|
|
# 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}
|
|
|
|
"
|
|
|
|
)
|
2020-03-04 00:23:53 +00:00
|
|
|
'';
|
|
|
|
|
2020-06-25 03:49:27 +01:00
|
|
|
passthru.tests = {
|
|
|
|
inherit (nixosTests) corerad;
|
|
|
|
};
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-01-02 14:17:09 +00:00
|
|
|
homepage = "https://github.com/mdlayher/corerad";
|
2020-10-26 04:08:40 +00:00
|
|
|
description = "Extensible and observable IPv6 NDP RA daemon";
|
2020-01-02 14:17:09 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ mdlayher ];
|
|
|
|
};
|
|
|
|
}
|