Skip to content
This repository has been archived by the owner on Apr 29, 2024. It is now read-only.

Commit

Permalink
Separate and update pgvector from upstream so we control the version (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
olirice authored Oct 18, 2023
1 parent c19da30 commit 9e92d7c
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
31 changes: 31 additions & 0 deletions ext/pgvector.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{ 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 $out/{lib,share/postgresql/extension}
cp *.so $out/lib
cp sql/*.sql $out/share/postgresql/extension
cp *.control $out/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;
};
}
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@
/* pljava */
"plv8"
"rum"
"pgvector"
"pg_repack"
"pgroonga"
];
Expand All @@ -97,6 +96,7 @@
./ext/pg_graphql.nix
./ext/pg_stat_monitor.nix
./ext/pg_jsonschema.nix
./ext/pgvector.nix
./ext/vault.nix
./ext/hypopg.nix
./ext/pg_tle.nix
Expand Down

0 comments on commit 9e92d7c

Please sign in to comment.