depot/pkgs/servers/sql/postgresql/ext/pgvector.nix
Luke Granger-Brown 57725ef3ec Squashed 'third_party/nixpkgs/' content from commit 76612b17c0ce
git-subtree-dir: third_party/nixpkgs
git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
2024-11-10 23:59:47 +00:00

30 lines
877 B
Nix

{ lib, stdenv, fetchFromGitHub, postgresql }:
stdenv.mkDerivation rec {
pname = "pgvector";
version = "0.6.2";
src = fetchFromGitHub {
owner = "pgvector";
repo = "pgvector";
rev = "v${version}";
hash = "sha256-r+TpFJg6WrMn0L2B7RpmSRvw3XxpHzMRtpFWDCzLvgs=";
};
buildInputs = [ postgresql ];
installPhase = ''
install -D -t $out/lib vector${postgresql.dlSuffix}
install -D -t $out/share/postgresql/extension sql/vector-*.sql
install -D -t $out/share/postgresql/extension vector.control
'';
meta = with lib; {
description = "Open-source vector similarity search for PostgreSQL";
homepage = "https://github.com/pgvector/pgvector";
changelog = "https://github.com/pgvector/pgvector/raw/v${version}/CHANGELOG.md";
license = licenses.postgresql;
platforms = postgresql.meta.platforms;
maintainers = [ ];
};
}