11{
22 lib ,
33 stdenv ,
4+ pkgs ,
45 fetchFromGitHub ,
56 postgresql ,
67 buildPgrxExtension_0_15_0 ,
7- rust-bin ,
88} :
9- let
10- rustVersion = "1.85.0" ; # Updated to support edition 2024
11- cargo = rust-bin . stable . ${ rustVersion } . default ;
12- in
139buildPgrxExtension_0_15_0 rec {
1410 pname = "kilobase" ;
1511 version = "0.1.0" ;
@@ -19,22 +15,23 @@ buildPgrxExtension_0_15_0 rec {
1915 owner = "KBVE" ;
2016 repo = "kbve" ;
2117 rev = "main" ; # Use main branch or specific commit hash
22- hash = "sha256-AKsvBd1UR28/o269Ys3lZzYkCRXXZrIgurE9C9lsW+Y =" ;
18+ hash = "sha256-VVH9GyKgKgkvi3iI8SffScPl00cIDlvPZbVJLgrzX1o =" ;
2319 } ;
2420
25- # Cargo.toml path if not at root
26- cargoRoot = "apps/kbve/kilobase" ;
21+ # Build from workspace root (with Rust 1.85 we support edition 2024)
22+ cargoRoot = "." ;
23+
24+ # Build only kilobase package - but don't use --package flag as buildAndTestSubdir handles it
25+ cargoBuildFlags = [ ] ;
2726
28- nativeBuildInputs = [ cargo ] ;
27+ nativeBuildInputs = [ ] ;
2928 buildInputs = [ postgresql ] ;
3029
3130 # Update this array when kilobase version is updated
3231 previousVersions = [
3332 # Add previous versions here when updating
3433 ] ;
3534
36- CARGO = "${ cargo } /bin/cargo" ;
37-
3835 # Darwin env needs PGPORT to be unique for build to not clash with other pgrx extensions
3936 env = lib . optionalAttrs stdenv . isDarwin {
4037 POSTGRES_LIB = "${ postgresql } /lib" ;
@@ -49,13 +46,19 @@ buildPgrxExtension_0_15_0 rec {
4946 cargoLock = {
5047 lockFile = "${ src } /Cargo.lock" ;
5148 allowBuiltinFetchGit = true ;
52- outputHashes = {
53- "jedi-0.2.0" = "sha256-23u6jB89ok7UUQMcHOcYA/4Lwq59JMEXbVx3gGPGOks=" ;
54- } ;
5549 } ;
5650
51+ # Add pg17 feature
52+ buildFeatures = [ "pg17" ] ;
53+
5754 # Disable tests for now
5855 doCheck = false ;
56+
57+ # Disable cargo-auditable to avoid issues
58+ auditable = false ;
59+
60+ # Tell cargo pgrx package which package to build
61+ buildAndTestSubdir = "apps/kbve/kilobase" ;
5962
6063 meta = with lib ; {
6164 description = "Kilobase PostgreSQL extension" ;
0 commit comments