Jelajahi Sumber

fix: nix embedded web-ui support (#19561)

Caleb Norton 3 minggu lalu
induk
melakukan
ff37d7c2df
2 mengubah file dengan 5 tambahan dan 0 penghapusan
  1. 1 0
      nix/node_modules.nix
  2. 4 0
      nix/opencode.nix

+ 1 - 0
nix/node_modules.nix

@@ -54,6 +54,7 @@ stdenvNoCC.mkDerivation {
       --filter '!./' \
       --filter './packages/opencode' \
       --filter './packages/desktop' \
+      --filter './packages/app' \
       --frozen-lockfile \
       --ignore-scripts \
       --no-progress

+ 4 - 0
nix/opencode.nix

@@ -3,6 +3,7 @@
   stdenvNoCC,
   callPackage,
   bun,
+  nodejs,
   sysctl,
   makeBinaryWrapper,
   models-dev,
@@ -19,6 +20,7 @@ stdenvNoCC.mkDerivation (finalAttrs: {
 
   nativeBuildInputs = [
     bun
+    nodejs # for patchShebangs node_modules
     installShellFiles
     makeBinaryWrapper
     models-dev
@@ -29,6 +31,8 @@ stdenvNoCC.mkDerivation (finalAttrs: {
     runHook preConfigure
 
     cp -R ${finalAttrs.node_modules}/. .
+    patchShebangs node_modules
+    patchShebangs packages/*/node_modules
 
     runHook postConfigure
   '';