Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
440a0f6
build(nix): fixing the kilobase cargo build.
h0lybyte Aug 4, 2025
6098bce
build(nix): updating kilobase not to use the cargo lock.
h0lybyte Aug 4, 2025
a2b7e59
build(nix): patching around the jedi issue.
h0lybyte Aug 4, 2025
6e3b106
build(nix): preparing the nix build for the new main hash.
h0lybyte Aug 4, 2025
231c554
build(nix): updating the kilobase hash.
h0lybyte Aug 4, 2025
f6a7e96
build(nix): reseting the hash for the jedi crate.
h0lybyte Aug 4, 2025
8775f92
build(nix): updating the jedi hash.
h0lybyte Aug 4, 2025
4a7643e
build(nix): need to reset the cache for kbve monorepo.
h0lybyte Aug 4, 2025
8960261
build(nix): updating the cargo hash.
h0lybyte Aug 4, 2025
3a5bd80
build(nix): updating the new hash.
h0lybyte Aug 4, 2025
e324858
build(nix): updating the kilobase reference again.
h0lybyte Aug 4, 2025
8300374
build(nix): preparing an isolated cargo toml at the root level.
h0lybyte Aug 4, 2025
e52d8a8
build(nix): updating kilobase isolation.
h0lybyte Aug 4, 2025
96788ff
build(nix): trying to isolate the kilobase plugin.
h0lybyte Aug 4, 2025
1a3c366
build(nix): added cargo hack to get around this workspace isolation i…
h0lybyte Aug 4, 2025
d512779
build(nix): updating the cargo hack reference.
h0lybyte Aug 4, 2025
db58346
build(nix): updating the kilobase reference.
h0lybyte Aug 4, 2025
71bafdf
build(nix): trying another way to build the kilobase.
h0lybyte Aug 4, 2025
5a3e5a3
build(nix): clearning cache
h0lybyte Aug 4, 2025
fdf5f47
build(nix): updating the hash.
h0lybyte Aug 4, 2025
62c2987
build(nix): clearing the hash again for the main monorepo.
h0lybyte Aug 4, 2025
53327e0
build(nix): updating the hash for the cargoLock.
h0lybyte Aug 4, 2025
26e3d39
build(nix): updating the build command again.
h0lybyte Aug 4, 2025
591a104
build(nix): overwriting the older build.
h0lybyte Aug 4, 2025
6f9da3b
build(nix): removing the double build.
h0lybyte Aug 4, 2025
e8eb0f7
build(nix): getting a better understanding of the error.
h0lybyte Aug 4, 2025
ce13e5a
build(nix): removing some of the other imports.
h0lybyte Aug 4, 2025
892d957
build(nix): adjusting the version issue.
h0lybyte Aug 4, 2025
f5d386e
build(nix): updating the versions json.
h0lybyte Aug 4, 2025
214e7a4
build(nix): maybe we could resolve the Cargo lock issue.
h0lybyte Aug 4, 2025
0e74139
build(nix): trying to build from the root workspace.
h0lybyte Aug 4, 2025
5bcbf35
build(nix): adjustments to the root package.
h0lybyte Aug 4, 2025
a345ff0
build(nix): updating the kilobase build.
h0lybyte Aug 4, 2025
0d9ce68
build(nix): another attempt.
h0lybyte Aug 4, 2025
ee0395d
build(nix): adding a patch.
h0lybyte Aug 4, 2025
14d711f
build(nix): reverting the workspace.
h0lybyte Aug 4, 2025
bd520f2
build(nix): updating the kilobase double flag issue.
h0lybyte Aug 4, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions nix/cargo-pgrx/versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,17 @@
"cargoHash": "sha256-Ny7j56pwB+2eEK62X0nWfFKQy5fBz+Q1oyvecivxLkk="
}
}
},
"0.15.0": {
"hash": "sha256-sksRfNV6l8YbdI6fzrEtanpDVV4sh14JXLqYBydHwy0=",
"rust": {
"1.85.0": {
"cargoHash": "sha256-4a7jz8+/HeOmEEWRadbFzEhAoYEd8Oj30vso5KYnDbs="
},
"1.87.0": {
"cargoHash": "sha256-TODO-NEEDS-PROPER-HASH"
}
}
}

}
31 changes: 17 additions & 14 deletions nix/ext/kilobase.nix
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
{
lib,
stdenv,
pkgs,
fetchFromGitHub,
postgresql,
buildPgrxExtension_0_15_0,
rust-bin,
}:
let
rustVersion = "1.85.0"; # Updated to support edition 2024
cargo = rust-bin.stable.${rustVersion}.default;
in
buildPgrxExtension_0_15_0 rec {
pname = "kilobase";
version = "0.1.0";
Expand All @@ -19,22 +15,23 @@ buildPgrxExtension_0_15_0 rec {
owner = "KBVE";
repo = "kbve";
rev = "main"; # Use main branch or specific commit hash
hash = "sha256-AKsvBd1UR28/o269Ys3lZzYkCRXXZrIgurE9C9lsW+Y=";
hash = "sha256-VVH9GyKgKgkvi3iI8SffScPl00cIDlvPZbVJLgrzX1o=";
};

# Cargo.toml path if not at root
cargoRoot = "apps/kbve/kilobase";
# Build from workspace root (with Rust 1.85 we support edition 2024)
cargoRoot = ".";

# Build only kilobase package - but don't use --package flag as buildAndTestSubdir handles it
cargoBuildFlags = [ ];

nativeBuildInputs = [ cargo ];
nativeBuildInputs = [ ];
buildInputs = [ postgresql ];

# Update this array when kilobase version is updated
previousVersions = [
# Add previous versions here when updating
];

CARGO = "${cargo}/bin/cargo";

# Darwin env needs PGPORT to be unique for build to not clash with other pgrx extensions
env = lib.optionalAttrs stdenv.isDarwin {
POSTGRES_LIB = "${postgresql}/lib";
Expand All @@ -49,13 +46,19 @@ buildPgrxExtension_0_15_0 rec {
cargoLock = {
lockFile = "${src}/Cargo.lock";
allowBuiltinFetchGit = true;
outputHashes = {
"jedi-0.2.0" = "sha256-23u6jB89ok7UUQMcHOcYA/4Lwq59JMEXbVx3gGPGOks=";
};
};

# Add pg17 feature
buildFeatures = [ "pg17" ];

# Disable tests for now
doCheck = false;

# Disable cargo-auditable to avoid issues
auditable = false;

# Tell cargo pgrx package which package to build
buildAndTestSubdir = "apps/kbve/kilobase";

meta = with lib; {
description = "Kilobase PostgreSQL extension";
Expand Down
12 changes: 9 additions & 3 deletions nix/overlays/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,14 @@
cargo-pgrx = final.cargo-pgrx.cargo-pgrx_0_14_3;
};

buildPgrxExtension_0_15_0 = prev.buildPgrxExtension.override {
cargo-pgrx = final.cargo-pgrx.cargo-pgrx_0_15_0;
};
buildPgrxExtension_0_15_0 =
let
rustVersion = "1.85.0";
pgrxVersion = "0.15.0";
mkPgrxExtension = final.callPackages ../cargo-pgrx/mkPgrxExtension.nix {
inherit rustVersion pgrxVersion;
};
in
mkPgrxExtension;
};
}