My personal project and infrastructure archive
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
nomicon/pkgs/tools/networking/corerad/default.nix

39 lines
1.1 KiB

{ lib, buildGoModule, fetchFromGitHub, nixosTests }:
buildGoModule rec {
pname = "corerad";
version = "1.2.1";
src = fetchFromGitHub {
owner = "mdlayher";
repo = "corerad";
rev = "v${version}";
sha256 = "sha256-JhdR1UKHnzXIUoe1shb3IZne3q198NLwRROEYuKsnW4=";
};
vendorSha256 = "sha256-w15dRxIBzDN5i4RNEDuSfCHHb4wc4fw1B2wjlTk40iE=";
# 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 lib; {
homepage = "https://github.com/mdlayher/corerad";
description = "Extensible and observable IPv6 NDP RA daemon";
license = licenses.asl20;
maintainers = with maintainers; [ mdlayher ];
platforms = platforms.linux;
};
}