Revert "postgresqlPackages.pgvecto-rs: 0.3.0 -> 0.4.0"
This reverts commit 80e13b1032
.
This commit is contained in:
parent
adaa460a69
commit
e0bf198048
@ -1,9 +0,0 @@
|
||||
diff --git a/crates/base/src/lib.rs b/crates/base/src/lib.rs
|
||||
index a303bbb..d776e8b 100644
|
||||
--- a/crates/base/src/lib.rs
|
||||
+++ b/crates/base/src/lib.rs
|
||||
@@ -1,3 +1,4 @@
|
||||
+#![feature(const_float_bits_conv)]
|
||||
#![feature(avx512_target_feature)]
|
||||
#![cfg_attr(target_arch = "x86_64", feature(stdarch_x86_avx512))]
|
||||
#![cfg_attr(target_arch = "x86_64", feature(stdarch_x86_avx512_f16))]
|
@ -0,0 +1,19 @@
|
||||
diff --git a/crates/c/build.rs b/crates/c/build.rs
|
||||
index 8d822e5..8b7e371 100644
|
||||
--- a/crates/c/build.rs
|
||||
+++ b/crates/c/build.rs
|
||||
@@ -1,9 +1,13 @@
|
||||
fn main() {
|
||||
println!("cargo:rerun-if-changed=src/f16.h");
|
||||
println!("cargo:rerun-if-changed=src/f16.c");
|
||||
+ println!("cargo:rerun-if-env-changed=BINDGEN_EXTRA_CLANG_ARGS");
|
||||
cc::Build::new()
|
||||
- .compiler("clang-16")
|
||||
+ .compiler("@clang@")
|
||||
.file("./src/f16.c")
|
||||
+ // read env var set by rustPlatform.bindgenHook
|
||||
+ .try_flags_from_environment("BINDGEN_EXTRA_CLANG_ARGS")
|
||||
+ .expect("the BINDGEN_EXTRA_CLANG_ARGS environment variable must be specified and UTF-8")
|
||||
.opt_level(3)
|
||||
.debug(true)
|
||||
.compile("vectorsc");
|
3373
pkgs/servers/sql/postgresql/ext/pgvecto-rs/Cargo.lock
generated
Normal file
3373
pkgs/servers/sql/postgresql/ext/pgvecto-rs/Cargo.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,7 @@
|
||||
{
|
||||
lib,
|
||||
buildPgrxExtension,
|
||||
cargo-pgrx_0_12_5,
|
||||
cargo-pgrx_0_12_0_alpha_1,
|
||||
clang_16,
|
||||
fetchFromGitHub,
|
||||
nix-update-script,
|
||||
@ -11,12 +11,13 @@
|
||||
postgresql,
|
||||
rustPlatform,
|
||||
stdenv,
|
||||
substituteAll,
|
||||
}:
|
||||
|
||||
let
|
||||
# Upstream only works with clang 16, so we're pinning it here to
|
||||
# avoid future incompatibility.
|
||||
# See https://docs.pgvecto.rs/developers/development.html#set-up-development-environment, step 2
|
||||
# See https://docs.pgvecto.rs/developers/development.html#environment, step 4
|
||||
clang = clang_16;
|
||||
rustPlatform' = rustPlatform // {
|
||||
bindgenHook = rustPlatform.bindgenHook.override { inherit clang; };
|
||||
@ -26,32 +27,42 @@ in
|
||||
(buildPgrxExtension.override {
|
||||
# Upstream only works with a fixed version of cargo-pgrx for each release,
|
||||
# so we're pinning it here to avoid future incompatibility.
|
||||
# See https://docs.pgvecto.rs/developers/development.html#set-up-development-environment, step 5
|
||||
cargo-pgrx = cargo-pgrx_0_12_5;
|
||||
# See https://docs.pgvecto.rs/developers/development.html#environment, step 6
|
||||
cargo-pgrx = cargo-pgrx_0_12_0_alpha_1;
|
||||
rustPlatform = rustPlatform';
|
||||
})
|
||||
rec {
|
||||
inherit postgresql;
|
||||
|
||||
pname = "pgvecto-rs";
|
||||
version = "0.4.0";
|
||||
version = "0.3.0";
|
||||
|
||||
buildInputs = [ openssl ];
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
|
||||
patches = [
|
||||
./0001-add-rustc-feature-flags.diff
|
||||
# Tell the `c` crate to use the flags from the rust bindgen hook
|
||||
(substituteAll {
|
||||
src = ./0001-read-clang-flags-from-environment.diff;
|
||||
clang = lib.getExe clang;
|
||||
})
|
||||
];
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "tensorchord";
|
||||
repo = "pgvecto.rs";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-4qrDWxYBJuQAtYlwU/zXVvX/ItqO26YAU/OHc/NLEUI=";
|
||||
hash = "sha256-X7BY2Exv0xQNhsS/GA7GNvj9OeVDqVCd/k3lUkXtfgE=";
|
||||
};
|
||||
|
||||
useFetchCargoVendor = true;
|
||||
cargoHash = "sha256-cyXKfkLju0hZe7IdNQ50AhhaEFtj795iaRutiQRuwZc=";
|
||||
# Package has git dependencies on Cargo.lock (instead of just crate.io dependencies),
|
||||
# so cargoHash does not work, therefore we have to include Cargo.lock in nixpkgs.
|
||||
cargoLock = {
|
||||
lockFile = ./Cargo.lock;
|
||||
outputHashes = {
|
||||
"pgrx-0.12.0-alpha.1" = "sha256-HSQrAR9DFJsi4ZF4hLiJ1sIy+M9Ygva2+WxeUzflOLk=";
|
||||
};
|
||||
};
|
||||
|
||||
# Set appropriate version on vectors.control, otherwise it won't show up on PostgreSQL
|
||||
postPatch = ''
|
||||
@ -59,7 +70,7 @@ in
|
||||
'';
|
||||
|
||||
# Include upgrade scripts in the final package
|
||||
# https://github.com/tensorchord/pgvecto.rs/blob/v0.4.0/scripts/package.sh#L15
|
||||
# https://github.com/tensorchord/pgvecto.rs/blob/v0.2.0/scripts/ci_package.sh#L6-L8
|
||||
postInstall = ''
|
||||
cp sql/upgrade/* $out/share/postgresql/extension/
|
||||
'';
|
||||
@ -82,7 +93,13 @@ in
|
||||
|
||||
meta = with lib; {
|
||||
# Upstream removed support for PostgreSQL 12 and 13 on 0.3.0: https://github.com/tensorchord/pgvecto.rs/issues/343
|
||||
broken = stdenv.hostPlatform.isDarwin || (versionOlder postgresql.version "14");
|
||||
broken =
|
||||
stdenv.hostPlatform.isDarwin
|
||||
|| (versionOlder postgresql.version "14")
|
||||
||
|
||||
# PostgreSQL 17 support issue upstream: https://github.com/tensorchord/pgvecto.rs/issues/607
|
||||
# Check after next package update.
|
||||
versionAtLeast postgresql.version "17" && version == "0.3.0";
|
||||
description = "Scalable, Low-latency and Hybrid-enabled Vector Search in Postgres";
|
||||
homepage = "https://github.com/tensorchord/pgvecto.rs";
|
||||
license = licenses.asl20;
|
||||
|
Loading…
Reference in New Issue
Block a user