From a58a02b18e6a507224d0d1b77fac2f4ccd90ebcc Mon Sep 17 00:00:00 2001 From: TomaSajt <62384384+TomaSajt@users.noreply.github.com> Date: Mon, 25 May 2026 17:47:21 +0200 Subject: [PATCH] feishin: unify electron-builder logic --- pkgs/by-name/fe/feishin/package.nix | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/pkgs/by-name/fe/feishin/package.nix b/pkgs/by-name/fe/feishin/package.nix index a43d25c3d323..bcdb50f4a5a0 100644 --- a/pkgs/by-name/fe/feishin/package.nix +++ b/pkgs/by-name/fe/feishin/package.nix @@ -74,20 +74,17 @@ buildNpmPackage { ln -s ${dart-sass}/bin/dart-sass "$dir"/sass ''; - postBuild = - lib.optionalString stdenv.hostPlatform.isDarwin '' - # electron-builder appears to build directly on top of Electron.app, by overwriting the files in the bundle. - cp -r ${electron.dist}/Electron.app ./ - find ./Electron.app -name 'Info.plist' | xargs -d '\n' chmod +rw - '' - + '' - npm exec electron-builder -- \ - --dir \ - -c.electronDist=${if stdenv.hostPlatform.isDarwin then "./" else electron.dist} \ - -c.electronVersion=${electron.version} \ - -c.npmRebuild=false \ - ${lib.optionalString stdenv.hostPlatform.isDarwin "-c.mac.identity=null"} - ''; + postBuild = '' + cp -r ${electron.dist} electron-dist + chmod -R u+w electron-dist + + npm exec electron-builder -- \ + --dir \ + -c.electronDist=electron-dist \ + -c.electronVersion=${electron.version} \ + -c.npmRebuild=false \ + ${lib.optionalString stdenv.hostPlatform.isDarwin "-c.mac.identity=null"} + ''; installPhase = '' runHook preInstall