From 3d83c66e6de83ab24aea32c1850f8c751d69894e Mon Sep 17 00:00:00 2001 From: Shogo Takata Date: Mon, 17 Aug 2026 10:52:29 +0900 Subject: [PATCH] super-productivity: fix build on Darwin Disable the beforePack hook which regenerates the macOS icon using /usr/bin/iconutil, as host tools are unavailable in the Nix sandbox. Use the complete, checked-in build/icon.icns instead. --- pkgs/by-name/su/super-productivity/package.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/by-name/su/super-productivity/package.nix b/pkgs/by-name/su/super-productivity/package.nix index 2c5b414374af..87a1cc853ff5 100644 --- a/pkgs/by-name/su/super-productivity/package.nix +++ b/pkgs/by-name/su/super-productivity/package.nix @@ -112,6 +112,12 @@ buildNpmPackage rec { # not our app directory, so it would search the wrong location. substituteInPlace electron/idle-time-handler.ts \ --replace-fail "path.dirname(process.execPath)" "path.dirname(app.getAppPath())" + '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' + # build/icon.icns is checked in and already contains all ten macOS icon + # representations. Avoid regenerating it with sandbox-unavailable iconutil. + substituteInPlace electron-builder.yaml \ + --replace-fail "beforePack: ./tools/beforePack.js" "" ''; buildPhase = ''