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 11
11
, rust-bin
12
12
} :
13
13
let
14
- rustVersion = "1.76 .0" ;
14
+ rustVersion = "1.80 .0" ;
15
15
cargo = rust-bin . stable . ${ rustVersion } . default ;
16
16
in
17
17
buildPgrxExtension_0_12_6 rec {
@@ -27,23 +27,33 @@ buildPgrxExtension_0_12_6 rec {
27
27
rev = "v${ version } " ;
28
28
hash = "sha256-CkoNMoh40zbQL4V49ZNYgv3JjoNWjODtTpHn+L8DdZA=" ;
29
29
} ;
30
+
30
31
nativeBuildInputs = [ pkg-config cargo ] ;
31
- buildInputs = [ openssl ] ++ lib . optionals ( stdenv . isDarwin ) [
32
+ buildInputs = [ openssl postgresql ] ++ lib . optionals ( stdenv . isDarwin ) [
32
33
darwin . apple_sdk . frameworks . CoreFoundation
33
34
darwin . apple_sdk . frameworks . Security
34
35
darwin . apple_sdk . frameworks . SystemConfiguration
35
36
] ;
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
+
36
47
OPENSSL_NO_VENDOR = 1 ;
37
48
#need to set this to 2 to avoid cpu starvation
38
49
CARGO_BUILD_JOBS = "2" ;
39
50
CARGO = "${ cargo } /bin/cargo" ;
51
+
40
52
cargoLock = {
41
53
lockFile = "${ src } /Cargo.lock" ;
42
- outputHashes = {
43
- "clickhouse-rs-1.0.0-alpha.1" = "sha256-0zmoUo/GLyCKDLkpBsnLAyGs1xz6cubJhn+eVqMEMaw=" ;
44
- } ;
54
+ allowBuiltinFetchGit = true ;
45
55
} ;
46
- postPatch = "cp ${ cargoLock . lockFile } Cargo.lock" ;
56
+
47
57
buildAndTestSubdir = "wrappers" ;
48
58
buildFeatures = [
49
59
"helloworld_fdw"
You can’t perform that action at this time.
0 commit comments