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): trying to isolate the kilobase plugin.
  • Loading branch information
h0lybyte committed Aug 4, 2025
commit 96788ffad43944dac2727deaa034a12f7ba3dae8
49 changes: 33 additions & 16 deletions nix/ext/kilobase.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,22 @@ buildPgrxExtension_0_15_0 rec {
rev = "main"; # Use main branch or specific commit hash
hash = "sha256-3HLpiGuM2zl6h7hIspe9lsHlo/kLy6FaxgTaopR7H4Y=";
};
in pkgs.runCommand "kilobase-filtered-src" {} ''
# Copy the full source
cp -r ${fullSrc} $out
in pkgs.runCommand "kilobase-isolated-src" {
nativeBuildInputs = [ cargo ];
CARGO = "${cargo}/bin/cargo";
} ''
# Copy only the kilobase directory and necessary files
mkdir -p $out/apps/kbve
cp -r ${fullSrc}/apps/kbve/kilobase $out/apps/kbve/

# Copy any shared files that might be needed (like .gitignore, etc.)
if [ -f ${fullSrc}/.gitignore ]; then
cp ${fullSrc}/.gitignore $out/
fi

chmod -R +w $out

# Create a minimal workspace Cargo.toml that only includes kilobase
# Create a standalone workspace Cargo.toml that only includes kilobase
cat > $out/Cargo.toml << 'EOF'
[workspace]
resolver = "2"
Expand All @@ -48,18 +58,18 @@ lto = "fat"
codegen-units = 1
EOF

# Remove problematic workspace members to prevent cargo from trying to process them
rm -rf $out/packages/rust/jedi || true
rm -rf $out/packages/rust/q || true
rm -rf $out/packages/rust/soul || true
rm -rf $out/packages/erust || true
rm -rf $out/packages/holy || true
rm -rf $out/apps/kbve/rust_kanban || true
rm -rf $out/apps/kbve/rust_api_profile || true
rm -rf $out/apps/rareicon || true
rm -rf $out/apps/experimental || true
rm -rf $out/apps/rentearth || true
rm -rf $out/apps/discord || true
# Change to workspace root and generate a new Cargo.lock with only kilobase dependencies
cd $out
${cargo}/bin/cargo generate-lockfile --offline || ${cargo}/bin/cargo generate-lockfile

# Verify the lockfile was created
if [ ! -f Cargo.lock ]; then
echo "Failed to generate Cargo.lock"
exit 1
fi

echo "Generated isolated Cargo.lock for kilobase"
ls -la
'';

# Cargo.toml path if not at root
Expand Down Expand Up @@ -100,6 +110,13 @@ EOF
# };
};

# Override the default Cargo.toml generation to use our filtered workspace
postPatch = ''
# Make sure we're using our filtered workspace configuration
ls -la Cargo.toml
cat Cargo.toml
'';

# Disable tests for now
doCheck = false;

Expand Down