@@ -0,0 +1,29 @@
1+{ stdenv, fetchFromGitHub, pkgconfig, postgresql }:
2+
3+stdenv.mkDerivation rec {
4+ name = "tsearch-extras-${version}";
5+ version = "0.2";
6+
7+ src = fetchFromGitHub {
8+ owner = "zulip";
9+ repo = "tsearch_extras";
10+ rev = version;
11+ sha256 = "1ivg9zn7f1ks31ixxwywifwhzxn6py8s5ky1djyxnb0s60zckfjg";
12+ };
13+
14+ nativebuildInputs = [ pkgconfig ];
15+ buildInputs = [ postgresql ];
16+
17+ installPhase = ''
18+ mkdir -p $out/bin
19+ install -D tsearch_extras.so -t $out/lib/
20+ install -D ./{tsearch_extras--1.0.sql,tsearch_extras.control} -t $out/share/extension
21+ '';
22+
23+ meta = with stdenv.lib; {
24+ description = "Provides a few PostgreSQL functions for a lower-level data full text search";
25+ homepage = https://github.com/zulip/tsearch_extras/;
26+ license = licenses.postgresql;
27+ maintainers = with maintainers; [ DerTim1 ];
28+ };
29+}