fix(nix): relax Bun version check for desktop build (#36767)
Co-authored-by: Test User <test@test.com>
This commit is contained in:
co-authored by
Test User
parent
fab2133129
commit
9da9ed9de6
+8
-1
@@ -42,9 +42,16 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
ELECTRON_SKIP_BINARY_DOWNLOAD = "1";
|
ELECTRON_SKIP_BINARY_DOWNLOAD = "1";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
postPatch =
|
||||||
|
# NOTE: Relax Bun version check to be a warning instead of an error
|
||||||
|
''
|
||||||
|
substituteInPlace packages/script/src/index.ts \
|
||||||
|
--replace-fail 'throw new Error(`This script requires bun@''${expectedBunVersionRange}' \
|
||||||
|
'console.warn(`Warning: This script requires bun@''${expectedBunVersionRange}'
|
||||||
|
''
|
||||||
# https://github.com/electron/electron/issues/31121
|
# https://github.com/electron/electron/issues/31121
|
||||||
# mac builds use a .app bundle which doesnt have this issue
|
# mac builds use a .app bundle which doesnt have this issue
|
||||||
postPatch = lib.optionalString stdenv.isLinux ''
|
+ lib.optionalString stdenv.isLinux ''
|
||||||
BASE_PATH=packages/desktop
|
BASE_PATH=packages/desktop
|
||||||
FILES=(src/main/windows.ts)
|
FILES=(src/main/windows.ts)
|
||||||
for file in "''${FILES[@]}"; do
|
for file in "''${FILES[@]}"; do
|
||||||
|
|||||||
Reference in New Issue
Block a user