Skip to content

Commit ee0395d

Browse files
committed
build(nix): adding a patch.
1 parent 0d9ce68 commit ee0395d

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

nix/ext/kilobase.nix

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ buildPgrxExtension_0_15_0 rec {
1818
hash = "sha256-VVH9GyKgKgkvi3iI8SffScPl00cIDlvPZbVJLgrzX1o=";
1919
};
2020

21-
# Build from workspace root to handle Cargo.lock properly
22-
cargoRoot = ".";
21+
# Build from the kilobase subdirectory
22+
cargoRoot = "apps/kbve/kilobase";
2323

24-
# Build only the kilobase package
25-
cargoBuildFlags = [ "--package" "kilobase" ];
24+
# No need for --package flag when in the package directory
25+
cargoBuildFlags = [ ];
2626

2727
nativeBuildInputs = [ ];
2828
buildInputs = [ postgresql ];
@@ -56,6 +56,11 @@ buildPgrxExtension_0_15_0 rec {
5656

5757
# Disable cargo-auditable to avoid issues with edition 2024
5858
auditable = false;
59+
60+
# Copy Cargo.lock to the subdirectory where cargo expects it
61+
postPatch = ''
62+
cp ${src}/Cargo.lock apps/kbve/kilobase/
63+
'';
5964

6065
meta = with lib; {
6166
description = "Kilobase PostgreSQL extension";

0 commit comments

Comments
 (0)