Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ buildGoModule, fetchFromGitHub, lib }: 2 3buildGoModule rec { 4 pname = "pgweb"; 5 version = "0.14.1"; 6 7 src = fetchFromGitHub { 8 owner = "sosedoff"; 9 repo = pname; 10 rev = "v${version}"; 11 hash = "sha256-0wwDye7Iku9+brYoVqlCpnm+A3xsr8tL2dyWaBVvres="; 12 }; 13 14 postPatch = '' 15 # Disable tests require network access. 16 rm -f pkg/client/{client,dump}_test.go 17 ''; 18 19 vendorHash = "sha256-Jpvf6cST3kBvYzCQLoJ1fijUC/hP1ouptd2bQZ1J/Lo="; 20 21 ldflags = [ "-s" "-w" ]; 22 23 checkFlags = 24 let 25 skippedTests = [ 26 # There is a `/tmp/foo` file on the test machine causing the test case to fail on macOS 27 "TestParseOptions" 28 ]; 29 in 30 [ "-skip" "${builtins.concatStringsSep "|" skippedTests}" ]; 31 32 meta = with lib; { 33 description = "A web-based database browser for PostgreSQL"; 34 longDescription = '' 35 A simple postgres browser that runs as a web server. You can view data, 36 run queries and examine tables and indexes. 37 ''; 38 homepage = "https://sosedoff.github.io/pgweb/"; 39 license = licenses.mit; 40 maintainers = with maintainers; [ zupo luisnquin ]; 41 }; 42}