2022-04-08 15:14:49 +01:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, nixosTests }:
|
2020-01-02 14:17:09 +00:00
|
|
|
|
2022-04-08 15:14:49 +01:00
|
|
|
buildGoModule rec {
|
2020-01-02 14:17:09 +00:00
|
|
|
pname = "corerad";
|
2024-03-12 18:57:48 +00:00
|
|
|
version = "1.3.0";
|
2020-01-02 14:17:09 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mdlayher";
|
|
|
|
repo = "corerad";
|
|
|
|
rev = "v${version}";
|
2024-03-12 18:57:48 +00:00
|
|
|
hash = "sha256-vIKmE9Lq8We7BTMUHIgnOU370ZnNW7YG75WALWdG+4A=";
|
2020-01-02 14:17:09 +00:00
|
|
|
};
|
|
|
|
|
2024-03-12 18:57:48 +00:00
|
|
|
vendorHash = "sha256-dsqFleXpL8yAcdigqxJsk/Sxvp9OTqbGK3xDEiHkM8A=";
|
2020-08-04 01:26:27 +01:00
|
|
|
|
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 = ''
|
2024-01-07 10:10:58 +00:00
|
|
|
ldflags+=" -X github.com/mdlayher/corerad/internal/build.linkVersion=v${version}"
|
|
|
|
ldflags+=" -X github.com/mdlayher/corerad/internal/build.linkTimestamp=$(<.gittagtime)"
|
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;
|
2024-03-12 19:15:28 +00:00
|
|
|
maintainers = with maintainers; [ mdlayher jmbaur ];
|
2022-04-06 16:38:58 +01:00
|
|
|
platforms = platforms.linux;
|
2024-02-11 02:19:15 +00:00
|
|
|
mainProgram = "corerad";
|
2020-01-02 14:17:09 +00:00
|
|
|
};
|
|
|
|
}
|