File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 8282 hash = "sha256-3TsNpEqNm3Uol5XPW1i0XEbP2fF2+RKB2d7lO6BDnvQ=" ;
8383 cargoHash = "sha256-LZUXhjMxkBs3O5feH4X5NQC7Qk4Ja6M5+sAYaSCikrY=" ;
8484 } ;
85+ cargo-pgrx_0_17_0 = mkCargoPgrx {
86+ version = "0.17.0" ;
87+ hash = "sha256-Ld7m7ggxlf8FufpeiAE9qcu49X0SgX6XXHS6KIewGyA=" ;
88+ cargoHash = "sha256-hNj39YzJna8iZxnlrLz+uLduxaD+uvggQRM7ng3MN1k=" ;
89+ } ;
8590 inherit mkCargoPgrx ;
8691}
Original file line number Diff line number Diff line change 115115 "cargoHash" : " sha256-95DHq5GLnAqb3bbKwwaeBeKEmkfRh81ZTRaJ7L59DAg="
116116 }
117117 }
118+ },
119+ "0.17.0" : {
120+ "hash" : " sha256-Ld7m7ggxlf8FufpeiAE9qcu49X0SgX6XXHS6KIewGyA=" ,
121+ "rust" : {
122+ "1.90.0" : {
123+ "cargoHash" : " sha256-hNj39YzJna8iZxnlrLz+uLduxaD+uvggQRM7ng3MN1k="
124+ }
125+ }
118126 }
119127}
Original file line number Diff line number Diff line change 1+ {
2+ lib ,
3+ stdenv ,
4+ callPackages ,
5+ postgresql ,
6+ rust-bin ,
7+ } :
8+ let
9+ pname = "vchord" ;
10+ version = "1.1.0" ;
11+ rustVersion = "1.90.0" ;
12+ pgrxVersion = "0.17.0" ;
13+
14+ cargo = rust-bin . stable . ${ rustVersion } . default ;
15+ mkPgrxExtension = callPackages ../cargo-pgrx/mkPgrxExtension.nix {
16+ inherit rustVersion pgrxVersion ;
17+ } ;
18+
19+ src = builtins . fetchGit {
20+ url = "https://github.com/tensorchord/VectorChord.git" ;
21+ rev = "c68a6aec9446899d0ab22662968053bd2820ddd4" ;
22+ shallow = true ;
23+ } ;
24+ in
25+ mkPgrxExtension {
26+ inherit
27+ pname
28+ version
29+ postgresql
30+ src
31+ ;
32+
33+ nativeBuildInputs = [ cargo ] ;
34+ buildInputs = [ postgresql ] ;
35+
36+ cargoLock = {
37+ lockFile = "${ src } /Cargo.lock" ;
38+ allowBuiltinFetchGit = true ;
39+ } ;
40+
41+ buildFeatures = [ "pg17" ] ;
42+
43+ CARGO = "${ cargo } /bin/cargo" ;
44+
45+ env = lib . optionalAttrs stdenv . isDarwin {
46+ POSTGRES_LIB = "${ postgresql } /lib" ;
47+ RUSTFLAGS = "-C link-arg=-undefined -C link-arg=dynamic_lookup" ;
48+ } ;
49+
50+ doCheck = false ;
51+ auditable = false ;
52+
53+ meta = with lib ; {
54+ description = "Scalable, fast, and disk-friendly vector search for Postgres" ;
55+ homepage = "https://github.com/tensorchord/VectorChord" ;
56+ platforms = postgresql . meta . platforms ;
57+ license = licenses . agpl3Plus ;
58+ } ;
59+ }
Original file line number Diff line number Diff line change 110110 cargo-pgrx_0_12_6
111111 cargo-pgrx_0_12_9
112112 cargo-pgrx_0_14_3
113+ cargo-pgrx_0_17_0
113114 ;
114115 }
115116 // lib . optionalAttrs pkgs . stdenv . isDarwin {
Original file line number Diff line number Diff line change 6161 ) ourExtensions ;
6262
6363 orioledbExtensions = orioleFilteredExtensions ++ [ ../ext/orioledb.nix ] ;
64- dbExtensions17 = orioleFilteredExtensions ++ [ ../ext/kilobase.nix ] ;
64+ dbExtensions17 = orioleFilteredExtensions ++ [ ../ext/kilobase.nix ../ext/vectorchord.nix ] ;
6565
6666 # CLI extensions - minimal set for Supabase CLI with migration support
6767 cliExtensions = [
You can’t perform that action at this time.
0 commit comments