File tree Expand file tree Collapse file tree 1 file changed +16
-6
lines changed Expand file tree Collapse file tree 1 file changed +16
-6
lines changed Original file line number Diff line number Diff line change 1111, rust-bin
1212} :
1313let
14- rustVersion = "1.76 .0" ;
14+ rustVersion = "1.80 .0" ;
1515 cargo = rust-bin . stable . ${ rustVersion } . default ;
1616in
1717buildPgrxExtension_0_12_6 rec {
@@ -27,23 +27,33 @@ buildPgrxExtension_0_12_6 rec {
2727 rev = "v${ version } " ;
2828 hash = "sha256-CkoNMoh40zbQL4V49ZNYgv3JjoNWjODtTpHn+L8DdZA=" ;
2929 } ;
30+
3031 nativeBuildInputs = [ pkg-config cargo ] ;
31- buildInputs = [ openssl ] ++ lib . optionals ( stdenv . isDarwin ) [
32+ buildInputs = [ openssl postgresql ] ++ lib . optionals ( stdenv . isDarwin ) [
3233 darwin . apple_sdk . frameworks . CoreFoundation
3334 darwin . apple_sdk . frameworks . Security
3435 darwin . apple_sdk . frameworks . SystemConfiguration
3536 ] ;
37+
38+ NIX_LDFLAGS = "-L${ postgresql } /lib -lpq" ;
39+
40+ # Set necessary environment variables for pgrx
41+ env = lib . optionalAttrs stdenv . isDarwin {
42+ POSTGRES_LIB = "${ postgresql } /lib" ;
43+ RUSTFLAGS = "-C link-arg=-undefined -C link-arg=dynamic_lookup" ;
44+ PGPORT = "5435" ;
45+ } ;
46+
3647 OPENSSL_NO_VENDOR = 1 ;
3748 #need to set this to 2 to avoid cpu starvation
3849 CARGO_BUILD_JOBS = "2" ;
3950 CARGO = "${ cargo } /bin/cargo" ;
51+
4052 cargoLock = {
4153 lockFile = "${ src } /Cargo.lock" ;
42- outputHashes = {
43- "clickhouse-rs-1.0.0-alpha.1" = "sha256-0zmoUo/GLyCKDLkpBsnLAyGs1xz6cubJhn+eVqMEMaw=" ;
44- } ;
54+ allowBuiltinFetchGit = true ;
4555 } ;
46- postPatch = "cp ${ cargoLock . lockFile } Cargo.lock" ;
56+
4757 buildAndTestSubdir = "wrappers" ;
4858 buildFeatures = [
4959 "helloworld_fdw"
You can’t perform that action at this time.
0 commit comments