Skip to content
Merged
Changes from 1 commit
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

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
build(nix): updating the build command again.
  • Loading branch information
h0lybyte committed Aug 4, 2025
commit 26e3d39596067d6451d4c781beadd0b0f034aa8d
66 changes: 36 additions & 30 deletions nix/ext/kilobase.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,33 +18,47 @@ buildPgrxExtension_0_15_0 rec {
version = "0.1.0";
inherit postgresql;

src = let
fullSrc = fetchFromGitHub {
owner = "KBVE";
repo = "kbve";
rev = "main"; # Use main branch or specific commit hash
hash = "sha256-3HLpiGuM2zl6h7hIspe9lsHlo/kLy6FaxgTaopR7H4Y=";
};
in pkgs.runCommand "kilobase-standalone-src" {} ''
# Copy only the kilobase source
mkdir -p $out
cp -r ${fullSrc}/apps/kbve/kilobase/* $out/
chmod -R +w $out

# Ensure we have a proper standalone Cargo.toml
ls -la $out/
cat $out/Cargo.toml || echo "No Cargo.toml found"
'';
src = fetchFromGitHub {
owner = "KBVE";
repo = "kbve";
rev = "main"; # Use main branch or specific commit hash
hash = "sha256-VVH9GyKgKgkvi3iI8SffScPl00cIDlvPZbVJLgrzX1o=";
};

# Since we're using the kilobase directory as root, no cargoRoot needed
# cargoRoot = "";
# Cargo.toml path if not at root
cargoRoot = "apps/kbve/kilobase";

# No cargoBuildFlags needed since we're building the root package
# Override build to use cargo pgrx package command
cargoBuildFlags = [ ];

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

# Override build phase to use the specific cargo pgrx package command
buildPhase = ''
runHook preBuild

cd ${cargoRoot}

# Use cargo pgrx package with specific features and output directory
cargo pgrx package \
--pg-config ${postgresql}/bin/pg_config \
--features pg17 \
--out-dir ../../../dist/target/kilobase

runHook postBuild
'';

installPhase = ''
runHook preInstall

# Install from the dist directory
mkdir -p $out
cp -r dist/target/kilobase/* $out/

runHook postInstall
'';

# Update this array when kilobase version is updated
previousVersions = [
# Add previous versions here when updating
Expand All @@ -63,16 +77,8 @@ buildPgrxExtension_0_15_0 rec {
);
};

# Use the original Cargo.lock but only build kilobase
cargoLock = let
fullSrc = fetchFromGitHub {
owner = "KBVE";
repo = "kbve";
rev = "main";
hash = "sha256-VVH9GyKgKgkvi3iI8SffScPl00cIDlvPZbVJLgrzX1o=";
};
in {
lockFile = "${fullSrc}/Cargo.lock";
cargoLock = {
lockFile = "${src}/Cargo.lock";
allowBuiltinFetchGit = true;
};

Expand Down