mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-23 22:23:15 +00:00
31 lines
869 B
Nix
31 lines
869 B
Nix
{ lib, stdenv, fetchFromGitHub, postgresql }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "pgvector";
|
|
version = "0.1.8";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "ankane";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "0kq28k96y5r0k6nhz78c3frqzhf8d1af54dqbpayn7fgvdl0vlm2";
|
|
};
|
|
|
|
buildInputs = [ postgresql ];
|
|
|
|
installPhase = ''
|
|
install -D -t $out/lib vector.so
|
|
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/ankane/pgvector";
|
|
changelog = "https://github.com/ankane/pgvector/raw/v${version}/CHANGELOG.md";
|
|
license = licenses.postgresql;
|
|
platforms = postgresql.meta.platforms;
|
|
maintainers = [ maintainers.marsam ];
|
|
};
|
|
}
|