File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -42,16 +42,23 @@ stdenv.mkDerivation (finalAttrs: {
4242 ELECTRON_SKIP_BINARY_DOWNLOAD = "1" ;
4343 } ;
4444
45- # https://github.com/electron/electron/issues/31121
46- # mac builds use a .app bundle which doesnt have this issue
47- postPatch = lib . optionalString stdenv . isLinux ''
48- BASE_PATH=packages/desktop
49- FILES=(src/main/windows.ts)
50- for file in "'' ${FILES[@]}"; do
51- substituteInPlace $BASE_PATH/$file \
52- --replace-fail "process.resourcesPath" "'$out/opt/opencode-desktop/resources'"
53- done
54- '' ;
45+ postPatch =
46+ # NOTE: Relax Bun version check to be a warning instead of an error
47+ ''
48+ substituteInPlace packages/script/src/index.ts \
49+ --replace-fail 'throw new Error(`This script requires bun@'' ${expectedBunVersionRange}' \
50+ 'console.warn(`Warning: This script requires bun@'' ${expectedBunVersionRange}'
51+ ''
52+ # https://github.com/electron/electron/issues/31121
53+ # mac builds use a .app bundle which doesnt have this issue
54+ + lib . optionalString stdenv . isLinux ''
55+ BASE_PATH=packages/desktop
56+ FILES=(src/main/windows.ts)
57+ for file in "'' ${FILES[@]}"; do
58+ substituteInPlace $BASE_PATH/$file \
59+ --replace-fail "process.resourcesPath" "'$out/opt/opencode-desktop/resources'"
60+ done
61+ '' ;
5562
5663 preBuild = ''
5764 cp -r "${ electron . dist } " $HOME/.electron-dist
You can’t perform that action at this time.
0 commit comments