3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/tools/networking/corerad/default.nix
Matt Layher 5d01b52010
corerad: 0.3.2 -> 0.3.3
Signed-off-by: Matt Layher <mdlayher@gmail.com>
2021-07-20 15:31:32 -04:00

41 lines
1.1 KiB
Nix

{ lib, buildGoModule, fetchFromGitHub, nixosTests }:
buildGoModule rec {
pname = "corerad";
version = "0.3.3";
src = fetchFromGitHub {
owner = "mdlayher";
repo = "corerad";
rev = "v${version}";
sha256 = "1xfqjxygf6r5wbf3brilx4d4hm0h518zaadmmzvkmbbz6w0fyl0k";
};
vendorSha256 = "0ydyfdx9syrv719knwv64srfx4d1m9pzkivfc3q188bx5qx67pjw";
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}
"
)
'';
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 ];
};
}