1{ lib, stdenv, fetchFromGitHub, postgresql }:
2
3stdenv.mkDerivation rec {
4 pname = "temporal_tables";
5 version = "1.2.2";
6
7 buildInputs = [ postgresql ];
8
9 src = fetchFromGitHub {
10 owner = "arkhipov";
11 repo = "temporal_tables";
12 rev = "v${version}";
13 sha256 = "sha256-7+DCSPAPhsokWDq/5IXNhd7jY6FfzxxUjlsg/VJeD3k=";
14 };
15
16 installPhase = ''
17 install -D -t $out/lib temporal_tables${postgresql.dlSuffix}
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 = "Temporal Tables PostgreSQL Extension";
24 homepage = "https://github.com/arkhipov/temporal_tables";
25 maintainers = with maintainers; [ ggpeti ];
26 platforms = postgresql.meta.platforms;
27 license = licenses.bsd2;
28 };
29}