1{ buildGoModule, fetchFromGitHub, lib }:
2
3buildGoModule rec {
4 pname = "pgweb";
5 version = "0.13.1";
6
7 src = fetchFromGitHub {
8 owner = "sosedoff";
9 repo = pname;
10 rev = "v${version}";
11 sha256 = "sha256-+sU+kNTOv78g4mvynXoIyNtmeIDxzfAs4Kr/Lx9zfiU=";
12 };
13
14 postPatch = ''
15 # Disable tests require network access.
16 rm -f pkg/client/{client,dump}_test.go
17 '';
18
19 vendorSha256 = "sha256-W+Vybea4oppD4BHRqcyouQL79cF+y+sONY9MRggti20=";
20
21 ldflags = [ "-s" "-w" ];
22
23 meta = with lib; {
24 description = "A web-based database browser for PostgreSQL";
25 longDescription = ''
26 A simple postgres browser that runs as a web server. You can view data,
27 run queries and examine tables and indexes.
28 '';
29 homepage = "https://sosedoff.github.io/pgweb/";
30 license = licenses.mit;
31 maintainers = with maintainers; [ zupo ];
32 };
33}