summary refs log tree commit diff
path: root/pkgs/servers/sql/postgresql/tsearch_extras/default.nix
blob: 5140ae1a228f1c0d24c88be7e8e81fcaf54dcf57 (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 rec {
  name = "tsearch-extras-${version}";
  version = "0.3";

  src = fetchFromGitHub {
    owner = "zulip";
    repo = "tsearch_extras";
    rev = version;
    sha256 = "0i3i99lw80jwd4xflgdqabxmn1dnm1gm7dzf1mqv2drllxcy3yix";
  };

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

  installPhase = ''
    mkdir -p $out/bin
    install -D tsearch_extras.so -t $out/lib/
    install -D ./{tsearch_extras--1.0.sql,tsearch_extras.control} -t $out/share/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;
    maintainers = with maintainers; [ DerTim1 ];
  };
}