summary refs log tree commit diff
path: root/pkgs/servers/sql/postgresql/ext/tsearch_extras.nix
blob: 77e4cd9df7ae8b0af0946b4a0cee899ce34994a2 (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
{ stdenv, fetchFromGitHub, pkgconfig, postgresql }:

stdenv.mkDerivation {
  pname = "tsearch-extras";
  version = "0.4";

  src = fetchFromGitHub {
    owner  = "zulip";
    repo   = "tsearch_extras";
    rev    = "84e78f00931c4ef261d98197d6b5d94fc141f742"; # no release tag?
    sha256 = "18j0saqblg3jhrz38splk173xjwdf32c67ymm18m8n5y94h8d2ba";
  };

  nativenativeBuildInputs = [ pkgconfig ];
  buildInputs = [ postgresql ];

  installPhase = ''
    install -D tsearch_extras.so -t $out/lib/
    install -D ./{tsearch_extras--1.0.sql,tsearch_extras.control} -t $out/share/postgresql/extension
  '';

  meta = with stdenv.lib; {
    description = "Provides a few PostgreSQL functions for a lower-level data full text search";
    homepage = https://github.com/zulip/tsearch_extras/;
    license = licenses.postgresql;
    platforms = postgresql.meta.platforms;
    maintainers = with maintainers; [ DerTim1 ];
  };
}