2020-06-25 03:49:27 +01:00
|
|
|
{ stdenv, buildGoModule, fetchFromGitHub, nixosTests }:
|
2020-01-02 14:17:09 +00:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "corerad";
|
2020-08-08 19:26:01 +01:00
|
|
|
version = "0.2.8";
|
2020-01-02 14:17:09 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mdlayher";
|
|
|
|
repo = "corerad";
|
|
|
|
rev = "v${version}";
|
2020-08-08 19:26:01 +01:00
|
|
|
sha256 = "053rihi8lqai3z837ddi441yl41lsg1zj9gl62s9vbjmq5l11fjh";
|
2020-01-02 14:17:09 +00:00
|
|
|
};
|
|
|
|
|
2020-08-08 19:26:01 +01:00
|
|
|
vendorSha256 = "1ra4yfplmgzxzs1nlbm0izg339fjnkfrw071y8w4m6q6wnzdhljb";
|
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;
|
|
|
|
};
|
|
|
|
|
2020-01-02 14:17:09 +00:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = "https://github.com/mdlayher/corerad";
|
|
|
|
description = "CoreRAD extensible and observable IPv6 NDP RA daemon";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ mdlayher ];
|
|
|
|
};
|
|
|
|
}
|