Skip to content

Commit

Permalink
postgresqlPackages.pgvecto-rs: 0.2.1 -> 0.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
diogotcorreia committed Jul 30, 2024
1 parent 9d3d0e6 commit da5ae1b
Show file tree
Hide file tree
Showing 7 changed files with 982 additions and 1,257 deletions.
5 changes: 3 additions & 2 deletions pkgs/development/tools/rust/cargo-pgrx/buildPgrxExtension.nix
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
# dependency here. Set to false and provide rustfmt in nativeBuildInputs, if you need it, e.g.
# if you include the generated code in the output via postInstall.
, useFakeRustfmt ? true
, usePgTestCheckFeature ? true
, ...
} @ args:
let
Expand Down Expand Up @@ -96,7 +97,7 @@ let
pg_ctl stop
'';

argsForBuildRustPackage = builtins.removeAttrs args [ "postgresql" "useFakeRustfmt" ];
argsForBuildRustPackage = builtins.removeAttrs args [ "postgresql" "useFakeRustfmt" "usePgTestCheckFeature" ];

# so we don't accidentally `(rustPlatform.buildRustPackage argsForBuildRustPackage) // { ... }` because
# we forgot parentheses
Expand Down Expand Up @@ -154,7 +155,7 @@ let
RUST_BACKTRACE = "full";

checkNoDefaultFeatures = true;
checkFeatures = (args.checkFeatures or [ ]) ++ [ "pg_test pg${pgrxPostgresMajor}" ];
checkFeatures = (args.checkFeatures or [ ]) ++ (lib.optionals usePgTestCheckFeature [ "pg_test" ]) ++ [ "pg${pgrxPostgresMajor}" ];
};
in
rustPlatform.buildRustPackage finalArgs
6 changes: 6 additions & 0 deletions pkgs/development/tools/rust/cargo-pgrx/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,10 @@ in
hash = "sha256-UHIfwOdXoJvR4Svha6ud0FxahP1wPwUtviUwUnTmLXU=";
cargoHash = "sha256-j4HnD8Zt9uhlV5N7ldIy9564o9qFEqs5KfXHmnQ1WEw=";
};

cargo-pgrx_0_12_0_alpha_1 = generic {
version = "0.12.0-alpha.1";
hash = "sha256-0m9oaqjU42RYyttkTihADDrRMjr2WoK/8sInZALeHws=";
cargoHash = "sha256-9XTIcpoCnROP63ZTDgMMMmj0kPggiTazKlKQfCgXKzk=";
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ index 8d822e5..8b7e371 100644
+++ b/crates/c/build.rs
@@ -1,9 +1,13 @@
fn main() {
println!("cargo:rerun-if-changed=src/c.h");
println!("cargo:rerun-if-changed=src/c.c");
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/c.c")
.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("pgvectorsc");
.compile("vectorsc");

This file was deleted.

Loading

0 comments on commit da5ae1b

Please sign in to comment.