2016-12-17 21:50:23 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, gcc, postgresql }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
|
|
|
|
name = "pg_similarity-1.0";
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "eulerto";
|
|
|
|
repo = "pg_similarity";
|
|
|
|
rev = "be1a8b08c8716e59b89982557da9ea68cdf868c5";
|
|
|
|
sha256 = "1z4v4r2yccdr8kz3935fnk1bc5vj0qj0apscldyap4wxlyi89xim";
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ postgresql gcc ];
|
|
|
|
buildPhase = "USE_PGXS=1 make";
|
|
|
|
installPhase = ''
|
|
|
|
install -D pg_similarity.so -t $out/lib/
|
2019-07-01 14:18:03 +00:00
|
|
|
install -D ./{pg_similarity--unpackaged--1.0.sql,pg_similarity--1.0.sql,pg_similarity.control} -t $out/share/postgresql/extension
|
2016-12-17 21:50:23 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2020-10-26 04:08:40 +00:00
|
|
|
description = "An extension to support similarity queries on PostgreSQL";
|
|
|
|
longDescription = ''
|
2016-12-17 21:50:23 +00:00
|
|
|
pg_similarity is an extension to support similarity queries on PostgreSQL. The implementation
|
|
|
|
is tightly integrated in the RDBMS in the sense that it defines operators so instead of the traditional
|
|
|
|
operators (= and <>) you can use ~~~ and ~!~ (any of these operators represents a similarity function).
|
|
|
|
'';
|
2019-05-06 11:00:00 +00:00
|
|
|
platforms = postgresql.meta.platforms;
|
2016-12-17 21:50:23 +00:00
|
|
|
license = stdenv.lib.licenses.gpl2;
|
|
|
|
maintainers = with lib.maintainers; [ danbst ];
|
|
|
|
};
|
|
|
|
}
|