Skip to content

Commit d0e7e61

Browse files
authored
fix(nix): update node_modules hash and use build-time bun version for version check (#28)
## Changes 1. **nix/hashes.json**: Update `x86_64-linux` node_modules hash to match current nixpkgs-unstable snapshot 2. **nix/deepagent-code.nix**: Add `patchPhase` that dynamically reads the actual bun version at build time, instead of hardcoding `^1.3.14`. This avoids build failures when nixpkgs-unstable ships a slightly different bun version (e.g., 1.3.13). ## Related Closes #27 Signed-off-by: thomas-yanga <odie_majere@outlook.com>
1 parent 61beac7 commit d0e7e61

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

nix/deepagent-code.nix

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ stdenvNoCC.mkDerivation (finalAttrs: {
1818
inherit (node_modules) version src;
1919
inherit node_modules;
2020

21+
patchPhase = ''
22+
BUN_VERSION=$(bun --version)
23+
sed -i "s/const expectedBunVersionRange.*/const expectedBunVersionRange = \"^$BUN_VERSION\";/" packages/script/src/index.ts
24+
'';
25+
2126
nativeBuildInputs = [
2227
bun
2328
nodejs # for patchShebangs node_modules

nix/hashes.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"nodeModules": {
3-
"x86_64-linux": "sha256-OttgLsPJSYW1b9RGqiYSi7qPdDC3GuD2FE7k5tPe6Iw=",
3+
"x86_64-linux": "sha256-vB4imi5LtCxnDuOaJFQh+asK51RUDCnIVCkIzBQN12o=",
44
"aarch64-linux": "sha256-VsmW8tTiT3VkTxp5oiYc/maJLSsBMxK6VVUSVshWVT8=",
55
"aarch64-darwin": "sha256-/MaQBX2zoJMtLA8jHt8+uKpIFve/eec3RfcKT3FvXC8=",
66
"x86_64-darwin": "sha256-3ggap9rgR2TvVbYgnXsgkg6Rj1TqNZu32QgTVRdN0f0="

0 commit comments

Comments
 (0)