1{ lib, stdenv, fetchFromGitHub, postgresql }:
2
3stdenv.mkDerivation rec {
4 pname = "pg_ivm";
5 version = "1.5.1";
6
7 src = fetchFromGitHub {
8 owner = "sraoss";
9 repo = pname;
10 rev = "v${version}";
11 hash = "sha256-AIH0BKk3y7F885IlC9pEyAubIgNSElpjU8nL6gl98FU=";
12 };
13
14 buildInputs = [ postgresql ];
15
16 installPhase = ''
17 install -D -t $out/lib *.so
18 install -D -t $out/share/postgresql/extension *.sql
19 install -D -t $out/share/postgresql/extension *.control
20 '';
21
22 meta = with lib; {
23 description = "Materialized views with IVM (Incremental View Maintenance) for PostgreSQL";
24 homepage = "https://github.com/sraoss/pg_ivm";
25 maintainers = with maintainers; [ ivan ];
26 platforms = postgresql.meta.platforms;
27 license = licenses.postgresql;
28 broken = versionOlder postgresql.version "13";
29 };
30}