Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildGoModule, 4 fetchFromGitHub, 5}: 6 7buildGoModule rec { 8 pname = "doc2go"; 9 version = "0.8.1"; 10 11 src = fetchFromGitHub { 12 owner = "abhinav"; 13 repo = "doc2go"; 14 rev = "v${version}"; 15 hash = "sha256-b4L20/9jm+bFGdNsHmcwSnzcmr3Il9XoV20284Ba8PU="; 16 }; 17 vendorHash = "sha256-d5ZRMFi7GIfDHsYRNvMnDdfnGhTM1sA0WDYD2aDoEd0="; 18 19 ldflags = [ 20 "-s" 21 "-w" 22 "-X main._version=${version}" 23 ]; 24 25 subPackages = [ "." ]; 26 # integration is it's own module 27 excludedPackages = [ "integration" ]; 28 29 checkFlags = [ 30 # needs to fetch additional go modules 31 "-skip=TestFinder_ImportedPackage/Modules" 32 ]; 33 34 preCheck = '' 35 # run all tests 36 unset subPackages 37 ''; 38 39 meta = with lib; { 40 homepage = "https://github.com/abhinav/doc2go"; 41 changelog = "https://github.com/abhinav/doc2go/blob/${src.rev}/CHANGELOG.md"; 42 description = "Your Go project's documentation, to-go"; 43 mainProgram = "doc2go"; 44 longDescription = '' 45 doc2go is a command line tool that generates static HTML documentation 46 from your Go code. It is a self-hosted static alternative to 47 https://pkg.go.dev/ and https://godocs.io/. 48 ''; 49 license = with licenses; [ 50 # general project license 51 asl20 52 # internal/godoc/synopsis*.go adapted from golang source 53 bsd3 54 ]; 55 maintainers = with maintainers; [ jk ]; 56 }; 57}