shogihome: fix sandbox build and missing resources on darwin (#426292)
This commit is contained in:
@@ -40,8 +40,9 @@ buildNpmPackage (finalAttrs: {
|
||||
|
||||
substituteInPlace .electron-builder.config.mjs \
|
||||
--replace-fail 'AppImage' 'dir'
|
||||
|
||||
# Workaround for https://github.com/electron/electron/issues/31121
|
||||
''
|
||||
# Workaround for https://github.com/electron/electron/issues/31121
|
||||
+ lib.optionalString stdenv.hostPlatform.isLinux ''
|
||||
substituteInPlace src/background/window/path.ts \
|
||||
--replace-fail 'process.resourcesPath' "'$out/share/lib/shogihome/resources'"
|
||||
'';
|
||||
@@ -71,12 +72,15 @@ buildNpmPackage (finalAttrs: {
|
||||
rm electron-dist/libvulkan.so.1
|
||||
cp '${lib.getLib vulkan-loader}/lib/libvulkan.so.1' electron-dist
|
||||
''
|
||||
# Explicitly set identity to null to avoid signing on arm64 macs with newer electron-builder.
|
||||
# See: https://github.com/electron-userland/electron-builder/pull/9007
|
||||
+ ''
|
||||
npm run electron:pack
|
||||
|
||||
./node_modules/.bin/electron-builder \
|
||||
--dir \
|
||||
--config .electron-builder.config.mjs \
|
||||
-c.mac.identity=null \
|
||||
-c.electronDist=electron-dist \
|
||||
-c.electronVersion=${electron.version}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user