Skip to content

Commit f50caa0

Browse files
committed
fix: Preserve symlinks during installation and handle broken links in bbdev package
1 parent b9d1723 commit f50caa0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

nix/bbdev-install.nix

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@ stdenv.mkDerivation {
2020
runHook preInstall
2121
2222
# Install the api directory (Motia backend + utils + steps)
23+
# Use --no-dereference to preserve symlinks, skip broken ones after copy
2324
mkdir -p $out/lib/bbdev
24-
cp -r api/* $out/lib/bbdev/
25+
cp -r --no-dereference api/* $out/lib/bbdev/
26+
find $out/lib/bbdev -type l ! -exec test -e {} \; -delete
2527
2628
# Install the bbdev CLI script
2729
mkdir -p $out/bin
@@ -31,7 +33,7 @@ stdenv.mkDerivation {
3133
# Patch workflow_dir to use BBDEV_API_DIR env var if set,
3234
# otherwise fall back to bbdev/api relative to CWD (project root)
3335
substituteInPlace $out/bin/.bbdev-unwrapped \
34-
--replace 'workflow_dir = os.path.dirname(os.path.abspath(__file__))' \
36+
--replace-fail 'workflow_dir = os.path.dirname(os.path.abspath(__file__))' \
3537
'workflow_dir = os.environ.get("BBDEV_API_DIR", os.path.join(os.getcwd(), "bbdev", "api"))'
3638
3739
# Wrap bbdev with Python env and Node.js in PATH

0 commit comments

Comments
 (0)