nixpkgs-suyu/pkgs/tools/networking/corerad/default.nix

41 lines
1.1 KiB
Nix
Raw Normal View History

{ lib, buildGoModule, fetchFromGitHub, nixosTests }:
buildGoModule rec {
pname = "corerad";
version = "0.3.4";
src = fetchFromGitHub {
owner = "mdlayher";
repo = "corerad";
rev = "v${version}";
sha256 = "0sf2r4q57hwdakv0b4skn76b0xy7bwj2j9rpj6frs5fkk6gsi6sm";
};
vendorSha256 = "123f9y1pfayfd5amkw5b8jzi8dbn7a16kbf7lzbmw69c1gj4gx9z";
doCheck = false;
# 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
'';
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 ];
};
}