2021-04-22 06:20:00 +02:00
|
|
|
{ lib, stdenv, fetchFromGitHub, postgresql }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "pgvector";
|
2021-09-08 01:00:00 +02:00
|
|
|
version = "0.1.8";
|
2021-04-22 06:20:00 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ankane";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-09-08 01:00:00 +02:00
|
|
|
sha256 = "0kq28k96y5r0k6nhz78c3frqzhf8d1af54dqbpayn7fgvdl0vlm2";
|
2021-04-22 06:20:00 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ postgresql ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
install -D -t $out/lib vector.so
|
2021-05-18 06:20:00 +02:00
|
|
|
install -D -t $out/share/postgresql/extension sql/vector-*.sql
|
2021-04-22 06:20:00 +02:00
|
|
|
install -D -t $out/share/postgresql/extension vector.control
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Open-source vector similarity search for PostgreSQL";
|
|
|
|
homepage = "https://github.com/ankane/pgvector";
|
2021-04-30 06:20:00 +02:00
|
|
|
changelog = "https://github.com/ankane/pgvector/raw/v${version}/CHANGELOG.md";
|
2021-04-22 06:20:00 +02:00
|
|
|
license = licenses.postgresql;
|
|
|
|
platforms = postgresql.meta.platforms;
|
|
|
|
maintainers = [ maintainers.marsam ];
|
|
|
|
};
|
|
|
|
}
|