Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildGoModule, 4 fetchFromGitHub, 5 testers, 6 timer, 7}: 8 9buildGoModule rec { 10 pname = "timer"; 11 version = "1.4.6"; 12 13 src = fetchFromGitHub { 14 owner = "caarlos0"; 15 repo = "timer"; 16 rev = "v${version}"; 17 hash = "sha256-Y4goNURzWl3DGeR14jEB87IJSNhSRqoF+/7zjGQ+19E="; 18 }; 19 20 vendorHash = "sha256-RMVlCWPezi0mCq3hsJrEHK5pw7dN/wnLHFYvmxaNCBM="; 21 22 ldflags = [ 23 "-s" 24 "-w" 25 "-X main.version=${version}" 26 ]; 27 28 passthru.tests.version = testers.testVersion { package = timer; }; 29 30 meta = with lib; { 31 description = "`sleep` with progress"; 32 homepage = "https://github.com/caarlos0/timer"; 33 license = licenses.mit; 34 maintainers = with maintainers; [ 35 zowoq 36 caarlos0 37 ]; 38 mainProgram = "timer"; 39 }; 40}