nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 48 lines 1.2 kB view raw
1{ 2 lib, 3 buildGoModule, 4 fetchFromGitHub, 5 nixosTests, 6 gitUpdater, 7}: 8 9buildGoModule rec { 10 pname = "corerad"; 11 version = "1.3.1"; 12 13 src = fetchFromGitHub { 14 owner = "mdlayher"; 15 repo = "corerad"; 16 rev = "v${version}"; 17 hash = "sha256-tVK4chDV26vpuTaqVWe498j8ijZN2OOhe97LLE+xK9Y="; 18 }; 19 20 vendorHash = "sha256-cmfRN7mU99TBtYmCsuHzliYqdfUHzDOFvKbnTZJqhLg="; 21 22 # Since the tarball pulled from GitHub doesn't contain git tag information, 23 # we fetch the expected tag's timestamp from a file in the root of the 24 # repository. 25 preBuild = '' 26 ldflags+=" -X github.com/mdlayher/corerad/internal/build.linkVersion=v${version}" 27 ldflags+=" -X github.com/mdlayher/corerad/internal/build.linkTimestamp=$(<.gittagtime)" 28 ''; 29 30 passthru = { 31 updateScript = gitUpdater { rev-prefix = "v"; }; 32 tests = { 33 inherit (nixosTests) corerad; 34 }; 35 }; 36 37 meta = with lib; { 38 homepage = "https://github.com/mdlayher/corerad"; 39 description = "Extensible and observable IPv6 NDP RA daemon"; 40 license = licenses.asl20; 41 maintainers = with maintainers; [ 42 mdlayher 43 jmbaur 44 ]; 45 platforms = platforms.linux; 46 mainProgram = "corerad"; 47 }; 48}