summary refs log tree commit diff
path: root/pkgs/servers/sql/postgresql/ext/jsonb_deep_sum.nix
blob: 092212aa3de00a04280f98a7764d59f21a0f11f1 (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
30
31
{ lib, stdenv, fetchFromGitHub, postgresql }:

stdenv.mkDerivation rec {
  pname = "jsonb_deep_sum";
  version = "unstable-2021-12-24";

  src = fetchFromGitHub {
    owner = "furstenheim";
    repo = "jsonb_deep_sum";
    rev = "d9c69aa6b7da860e5522a9426467e67cb787980c";
    sha256 = "sha256-W1wNILAwTAjFPezq+grdRMA59KEnMZDz69n9xQUqdc0=";
  };

  buildInputs = [ postgresql ];

  installPhase = ''
    mkdir -p $out/{lib,share/postgresql/extension}

    cp *${postgresql.dlSuffix} $out/lib
    cp *.sql     $out/share/postgresql/extension
    cp *.control $out/share/postgresql/extension
  '';

  meta = with lib; {
    description = "PostgreSQL extension to easily add jsonb numeric";
    homepage = "https://github.com/furstenheim/jsonb_deep_sum";
    maintainers = with maintainers; [ _1000101 ];
    platforms = postgresql.meta.platforms;
    license = licenses.mit;
  };
}