From 972f78b6fbf75a17e192d19c20440fca24c8b01c Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Fri, 14 Oct 2022 04:20:00 +0000 Subject: [PATCH] postgresql15Packages.pgvector: fix build for PostgreSQL 15 --- pkgs/servers/sql/postgresql/ext/pgvector.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pkgs/servers/sql/postgresql/ext/pgvector.nix b/pkgs/servers/sql/postgresql/ext/pgvector.nix index ddc51e8d2b73..c04cb0c3b159 100644 --- a/pkgs/servers/sql/postgresql/ext/pgvector.nix +++ b/pkgs/servers/sql/postgresql/ext/pgvector.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, postgresql }: +{ lib, stdenv, fetchFromGitHub, fetchpatch, postgresql }: stdenv.mkDerivation rec { pname = "pgvector"; @@ -11,6 +11,14 @@ stdenv.mkDerivation rec { sha256 = "sha256-kIgdr3+KC11Qxk1uBTmcN4dDaLIhfo/Fs898boESsBc="; }; + patches = [ + # Added support for Postgres 15. Remove with the next release. + (fetchpatch { + url = "https://github.com/pgvector/pgvector/commit/c9c6b96eede7d78758ca7ca5db98bf8b24021d0f.patch"; + sha256 = "sha256-hgCpGtuYmqo4Ttlpn4FBskbNdZmM1wJeMQBJZ7H923g="; + }) + ]; + buildInputs = [ postgresql ]; installPhase = ''