forked from ryan-blunden/django-chatgpt-clone
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpgvector.nix
30 lines (25 loc) · 867 Bytes
/
pgvector.nix
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
30
{ lib, stdenv, fetchFromGitHub, postgresql }:
stdenv.mkDerivation rec {
pname = "pgvector";
version = "0.5.1";
buildInputs = [ postgresql ];
src = fetchFromGitHub {
owner = "pgvector";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-ZNzq+dATZn9LUgeOczsaadr5hwdbt9y/+sAOPIdr77U=";
};
installPhase = ''
mkdir -p ${postgresql}/{lib,share/postgresql/extension}
cp *.so ${postgresql}/lib
cp sql/*.sql ${postgresql}/share/postgresql/extension
cp *.control ${postgresql}/share/postgresql/extension
'';
meta = with lib; {
description = "Open-source vector similarity search for Postgres";
homepage = "https://github.com/${src.owner}/${src.repo}";
maintainers = with maintainers; [ olirice ];
platforms = postgresql.meta.platforms;
license = licenses.postgresql;
};
}