diff --git a/pkgs/by-name/gi/gitify/package.nix b/pkgs/by-name/gi/gitify/package.nix index a29faeeb9c2f..b78302dcb6d7 100644 --- a/pkgs/by-name/gi/gitify/package.nix +++ b/pkgs/by-name/gi/gitify/package.nix @@ -13,39 +13,57 @@ makeWrapper, nix-update-script, }: +let + pnpm = pnpm_10_29_2; +in stdenv.mkDerivation (finalAttrs: { pname = "gitify"; - version = "6.17.0"; + version = "6.20.0"; src = fetchFromGitHub { owner = "gitify-app"; repo = "gitify"; tag = "v${finalAttrs.version}"; - hash = "sha256-A9LeitceqDGictQbB7OYOI/pggrW9u8A7TUMblK/LHM="; + hash = "sha256-zKvI9uwKiKKbHTzM/LIhCzUCcM104UNReRJb51iQonc="; }; nativeBuildInputs = [ nodejs pnpmConfigHook - pnpm_10_29_2 + pnpm copyDesktopItems imagemagick makeWrapper ]; + strictDeps = true; + __structuredAttrs = true; + pnpmDeps = fetchPnpmDeps { inherit (finalAttrs) pname version src; - pnpm = pnpm_10_29_2; - fetcherVersion = 3; - hash = "sha256-0iTvrIe5PVj99ePWt8rn+laikdJ5TaNQ8GZGHyUTTQI="; + inherit pnpm; + fetcherVersion = 4; + hash = "sha256-KjRcUVeByCXetX7skJoxt6LU6EZcOG+5U2y3sr3XP7A="; }; env.ELECTRON_SKIP_BINARY_DOWNLOAD = 1; postPatch = '' - substituteInPlace config/electron-builder.js \ + substituteInPlace electron-builder.js \ --replace-fail "'Adam Setch (5KD23H9729)'" "null" \ --replace-fail "'scripts/afterSign.js'" "null" + + # With a nixpkgs electron wrapper, app.isPackaged always returns false, + # so isDevMode() is always true. This causes the config.ts getter for + # indexHtml to return VITE_DEV_SERVER_URL (which is empty) instead of the + # packaged file:// URL, resulting in a blank white window. + # Patch isDevMode() to false so the file:// path is always used. + substituteInPlace src/main/config.ts \ + --replace-fail "isDevMode()" "false" + + # Disable auto-updater; updates are handled via nixpkgs. + substituteInPlace src/main/updater.ts \ + --replace-fail "if (!this.menubar.app.isPackaged)" "if (true)" ''; buildPhase = '' @@ -57,7 +75,7 @@ stdenv.mkDerivation (finalAttrs: { pnpm build pnpm exec electron-builder \ - --config config/electron-builder.js \ + --config electron-builder.js \ --dir \ -c.electronDist=electron-dist \ -c.electronVersion="${electron.version}" \