diff --git a/pkgs/by-name/re/repath-studio/0001-disable-auto-update-check.patch b/pkgs/by-name/re/repath-studio/0001-disable-auto-update-check.patch new file mode 100644 index 000000000000..d3bc410e9873 --- /dev/null +++ b/pkgs/by-name/re/repath-studio/0001-disable-auto-update-check.patch @@ -0,0 +1,36 @@ +From 399263410c5edfb6bf1e359db6b9539e86687911 Mon Sep 17 00:00:00 2001 +From: phanirithvij +Date: Thu, 30 Jul 2026 12:18:28 +0530 +Subject: [PATCH] disable auto update check + +Signed-off-by: phanirithvij +--- + src/electron/main.cljs | 5 +---- + 1 file changed, 1 insertion(+), 4 deletions(-) + +diff --git a/src/electron/main.cljs b/src/electron/main.cljs +index cdc2a5a0..e86922d6 100644 +--- a/src/electron/main.cljs ++++ b/src/electron/main.cljs +@@ -5,7 +5,6 @@ + ["@sentry/electron/main" :as sentry-electron-main] + ["electron" :refer [app shell ipcMain BrowserWindow]] + ["electron-log/main" :as log] +- ["electron-updater" :refer [autoUpdater]] + ["electron-window-state" :as window-state-keeper] + ["os" :as os] + ["path" :as path] +@@ -148,9 +147,7 @@ + (register-web-contents-events) + (register-ipc-on-events) + (register-ipc-handle-events) +- (register-window-events) +- +- (.checkForUpdatesAndNotify autoUpdater))) ++ (register-window-events))) + + (defn init-loading-window! [] + (set! (.-allowRendererProcessReuse app) false) +-- +2.55.0 + diff --git a/pkgs/by-name/re/repath-studio/package.nix b/pkgs/by-name/re/repath-studio/package.nix index ae1e20c5b5c9..262f81652484 100644 --- a/pkgs/by-name/re/repath-studio/package.nix +++ b/pkgs/by-name/re/repath-studio/package.nix @@ -7,6 +7,7 @@ pkg-config, electron, chromium, + libicns, cacert, clojure, git, @@ -34,6 +35,7 @@ buildNpmPackage (finalAttrs: { # outputHash of clojureHome changes each time `clojure` is updated # https://github.com/ngi-nix/ngipkgs/pull/1727#discussion_r2470180998 ./pin-clojure.patch + ./0001-disable-auto-update-check.patch ]; makeCacheWritable = true; @@ -45,6 +47,9 @@ buildNpmPackage (finalAttrs: { makeWrapper copyDesktopItems pkg-config # sharp + ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ + libicns ]; # For 'sharp' dependency, otherwise it will try to build it @@ -53,6 +58,10 @@ buildNpmPackage (finalAttrs: { env = { ELECTRON_SKIP_BINARY_DOWNLOAD = true; PUPPETEER_SKIP_DOWNLOAD = true; + } + // lib.optionalAttrs stdenv.hostPlatform.isDarwin { + # Prevent "unable to get local issuer certificate" error + NODE_EXTRA_CA_CERTS = "${cacert}/etc/ssl/certs/ca-bundle.crt"; }; postPatch = '' @@ -68,9 +77,15 @@ buildNpmPackage (finalAttrs: { chmod -R u+w "$electron_dist" npm run build + ${lib.optionalString stdenv.hostPlatform.isDarwin '' + mkdir -p build + png2icns build/icon.icns resources/public/img/icon.png + ''} npm exec electron-builder -- --dir \ -c.electronDist="$electron_dist" \ - -c.electronVersion=${electron.version} + -c.electronVersion=${electron.version} \ + -c.mac.identity=null \ + ${lib.optionalString stdenv.hostPlatform.isDarwin "-c.mac.icon=build/icon.icns"} runHook postBuild ''; @@ -106,7 +121,7 @@ buildNpmPackage (finalAttrs: { # chromium package not available for darwin doCheck = stdenv.hostPlatform.isLinux; - checkPhase = '' + checkPhase = lib.optionalString (stdenv.hostPlatform.isLinux) /* sh */ '' runHook preCheck export ELECTRON_OVERRIDE_DIST_PATH="$electron_dist" export PUPPETEER_EXECUTABLE_PATH=${chromium}/bin/chromium