summary refs log tree commit diff
path: root/pkgs/servers/sql/postgresql/ext/temporal_tables.nix
blob: cb401829b2425d4d96269b7b96149585013ee72b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{ lib, stdenv, fetchFromGitHub, postgresql }:

stdenv.mkDerivation rec {
  pname = "temporal_tables";
  version = "1.2.2";

  buildInputs = [ postgresql ];

  src = fetchFromGitHub {
    owner  = "arkhipov";
    repo   = "temporal_tables";
    rev    = "v${version}";
    sha256 = "sha256-7+DCSPAPhsokWDq/5IXNhd7jY6FfzxxUjlsg/VJeD3k=";
  };

  installPhase = ''
    install -D -t $out/lib temporal_tables${postgresql.dlSuffix}
    install -D -t $out/share/postgresql/extension *.sql
    install -D -t $out/share/postgresql/extension *.control
 '';

  meta = with lib; {
    description = "Temporal Tables PostgreSQL Extension";
    homepage    = "https://github.com/arkhipov/temporal_tables";
    maintainers = with maintainers; [ ggpeti ];
    platforms   = postgresql.meta.platforms;
    license     = licenses.bsd2;
  };
}