Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 fetchFromGitHub, 3 buildGoModule, 4 lib, 5 go, 6 makeWrapper, 7}: 8 9buildGoModule rec { 10 pname = "pushup"; 11 version = "0.2"; 12 13 src = fetchFromGitHub { 14 owner = "adhocteam"; 15 repo = "pushup"; 16 rev = "v${version}"; 17 hash = "sha256-9ENXeVON2/Bt8oXnyVw+Vl0bPVPP7iFSyhxwc091ZIs="; 18 }; 19 20 vendorHash = null; 21 subPackages = "."; 22 # Pushup doesn't need CGO so disable it. 23 env.CGO_ENABLED = 0; 24 ldflags = [ 25 "-s" 26 "-w" 27 ]; 28 nativeBuildInputs = [ makeWrapper ]; 29 # The Go compiler is a runtime dependency of Pushup. 30 allowGoReference = true; 31 postInstall = '' 32 wrapProgram $out/bin/${meta.mainProgram} --prefix PATH : ${lib.makeBinPath [ go ]} 33 ''; 34 35 meta = with lib; { 36 description = "Web framework for Go"; 37 homepage = "https://pushup.adhoc.dev/"; 38 license = licenses.mit; 39 changelog = "https://github.com/adhocteam/pushup/blob/${src.rev}/CHANGELOG.md"; 40 mainProgram = "pushup"; 41 maintainers = with maintainers; [ paulsmith ]; 42 }; 43}