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