nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 libpq,
6 openssl,
7 nixosTests,
8}:
9stdenv.mkDerivation {
10 pname = "pgmanage";
11 # The last release 11.0.1 from 2018 fails the NixOS test
12 # probably because of PostgreSQL-12 incompatibility.
13 # Fortunately the latest master does succeed the test.
14 version = "unstable-2022-05-11";
15
16 src = fetchFromGitHub {
17 owner = "pgManage";
18 repo = "pgManage";
19 rev = "a028604416be382d6d310bc68b4e7c3cd16020fb";
20 sha256 = "sha256-ibCzZrqfbio1wBVFKB6S/wdRxnCc7s3IQdtI9txxhaM=";
21 };
22
23 patchPhase = ''
24 patchShebangs src/configure
25 '';
26
27 configurePhase = ''
28 ./configure --prefix $out
29 '';
30
31 buildInputs = [
32 libpq
33 openssl
34 ];
35
36 nativeBuildInputs = [
37 libpq.pg_config
38 ];
39
40 passthru.tests.sign-in = nixosTests.pgmanage;
41
42 meta = {
43 description = "Fast replacement for PGAdmin";
44 longDescription = ''
45 At the heart of pgManage is a modern, fast, event-based C-binary, built in
46 the style of NGINX and Node.js. This heart makes pgManage as fast as any
47 PostgreSQL interface can hope to be. (Note: pgManage replaces Postage,
48 which is no longer maintained.)
49 '';
50 homepage = "https://github.com/pgManage/pgManage";
51 license = lib.licenses.postgresql;
52 maintainers = [ lib.maintainers.basvandijk ];
53 mainProgram = "pgmanage";
54 };
55}