Unverified Commit 04b04dee authored by Wolfgang Walther's avatar Wolfgang Walther Committed by GitHub
Browse files

postgresqlPackages.vectorchord: init at 0.4.2 (#392710)

parents d36c3f7a ab82f5a5
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -76,4 +76,9 @@ in
    cargoHash = "sha256-pnMxWWfvr1/AEp8DvG4awig8zjdHizJHoZ5RJA8CL08=";
  };

  cargo-pgrx_0_14_1 = generic {
    version = "0.14.1";
    hash = "sha256-oMToAhKkRiCyC8JYS0gmo/XX3QVcVtF5mUV0aQjd+p8=";
    cargoHash = "sha256-RawGAQGtG2QVDCMbwjmUEaH6rDeRiBvvJsGCY8wySw0=";
  };
}
+8 −1
Original line number Diff line number Diff line
{
  buildPgrxExtension,
  cargo-pgrx_0_12_6,
  postgresql,
  fetchFromGitHub,
  lib,
  postgresqlTestExtension,
}:

buildPgrxExtension (finalAttrs: {
let
  buildPgrxExtension' = buildPgrxExtension.override {
    # Upstream only works with a fixed minor version of cargo-pgrx for each release.
    cargo-pgrx = cargo-pgrx_0_12_6;
  };
in
buildPgrxExtension' (finalAttrs: {
  pname = "pgvectorscale";
  version = "0.7.0";

+8 −1
Original line number Diff line number Diff line
{
  buildPgrxExtension,
  cargo-pgrx_0_12_6,
  fetchFromGitHub,
  lib,
  nix-update-script,
  postgresql,
  util-linux,
}:
buildPgrxExtension (finalAttrs: {
let
  buildPgrxExtension' = buildPgrxExtension.override {
    # Upstream only works with a fixed minor version of cargo-pgrx for each release.
    cargo-pgrx = cargo-pgrx_0_12_6;
  };
in
buildPgrxExtension' (finalAttrs: {
  inherit postgresql;

  pname = "pgx_ulid";
+29 −0
Original line number Diff line number Diff line
diff --git a/crates/simd/build.rs b/crates/simd/build.rs
index 12ce198..aed5588 100644
--- a/crates/simd/build.rs
+++ b/crates/simd/build.rs
@@ -17,17 +17,24 @@ use std::error::Error;
 
 fn main() -> Result<(), Box<dyn Error>> {
     println!("cargo::rerun-if-changed=cshim");
+    println!("cargo:rerun-if-env-changed=BINDGEN_EXTRA_CLANG_ARGS");
     let target_arch = var("CARGO_CFG_TARGET_ARCH")?;
     match target_arch.as_str() {
         "aarch64" => {
             let mut build = cc::Build::new();
             build.file("./cshim/aarch64.c");
+            build.compiler("@clang@");
+            // read env var set by rustPlatform.bindgenHook
+            build.try_flags_from_environment("BINDGEN_EXTRA_CLANG_ARGS").expect("the BINDGEN_EXTRA_CLANG_ARGS environment variable must be specified and UTF-8");
             build.opt_level(3);
             build.compile("simd_cshim");
         }
         "x86_64" => {
             let mut build = cc::Build::new();
             build.file("./cshim/x86_64.c");
+            build.compiler("@clang@");
+            // read env var set by rustPlatform.bindgenHook
+            build.try_flags_from_environment("BINDGEN_EXTRA_CLANG_ARGS").expect("the BINDGEN_EXTRA_CLANG_ARGS environment variable must be specified and UTF-8");
             build.opt_level(3);
             build.compile("simd_cshim");
         }
+24 −0
Original line number Diff line number Diff line
diff --git a/crates/algorithm/src/lib.rs b/crates/algorithm/src/lib.rs
index 853a280..f88acbf 100644
--- a/crates/algorithm/src/lib.rs
+++ b/crates/algorithm/src/lib.rs
@@ -13,6 +13,7 @@
 // Copyright (c) 2025 TensorChord Inc.
 
 #![feature(select_unpredictable)]
+#![feature(let_chains)]
 #![allow(clippy::type_complexity)]
 
 mod build;
diff --git a/src/lib.rs b/src/lib.rs
index 654b4d1..2b11d03 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -13,6 +13,7 @@
 // Copyright (c) 2025 TensorChord Inc.
 
 #![allow(unsafe_code)]
+#![feature(let_chains)]
 
 mod datatype;
 mod index;
Loading