1{ lib, stdenv, fetchFromGitHub, postgresql }:
2
3stdenv.mkDerivation rec {
4 pname = "hypopg";
5 version = "1.4.0";
6
7 src = fetchFromGitHub {
8 owner = "HypoPG";
9 repo = "hypopg";
10 rev = version;
11 hash = "sha256-YzQnkQi9BlDryUySnWHWeTanhgfVUXjHjOqj+nQucCY=";
12 };
13
14 buildInputs = [ postgresql ];
15
16 installPhase = ''
17 install -D -t $out/lib *${postgresql.dlSuffix}
18 install -D -t $out/share/postgresql/extension *.control
19 install -D -t $out/share/postgresql/extension *.sql
20 '';
21
22 meta = with lib; {
23 description = "Hypothetical Indexes for PostgreSQL";
24 homepage = "https://hypopg.readthedocs.io";
25 license = licenses.postgresql;
26 platforms = postgresql.meta.platforms;
27 maintainers = with maintainers; [ bbigras ];
28 };
29}