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