diff --git a/pkgs/by-name/no/notion-app/package.nix b/pkgs/by-name/no/notion-app/package.nix index e99f9bb0fa1e..767bda0e3b33 100644 --- a/pkgs/by-name/no/notion-app/package.nix +++ b/pkgs/by-name/no/notion-app/package.nix @@ -5,9 +5,7 @@ unzip, }: let - info = - (lib.importJSON ./sources.json)."${stdenvNoCC.hostPlatform.parsed.cpu.name}-darwin" - or (throw "Unsupported CPU architecture: ${stdenvNoCC.hostPlatform.parsed.cpu.name}"); + info = lib.importJSON ./source.json; in stdenvNoCC.mkDerivation (finalAttrs: { pname = "notion-app"; @@ -37,7 +35,6 @@ stdenvNoCC.mkDerivation (finalAttrs: { pradyuman ]; platforms = [ - "x86_64-darwin" "aarch64-darwin" ]; sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; diff --git a/pkgs/by-name/no/notion-app/source.json b/pkgs/by-name/no/notion-app/source.json new file mode 100644 index 000000000000..8d095dc524f7 --- /dev/null +++ b/pkgs/by-name/no/notion-app/source.json @@ -0,0 +1,5 @@ +{ + "version": "7.25.1", + "url": "https://desktop-release.notion-static.com/Notion-arm64-7.25.1.zip", + "hash": "sha512-1t+hNS33R3CX+inR8ArKvm4LDn0Wu7JiCU91ucnaAgQm85XUcWFdxk/f421M9XqG1Wte+webFX45LXDlixKa2A==" +} diff --git a/pkgs/by-name/no/notion-app/sources.json b/pkgs/by-name/no/notion-app/sources.json deleted file mode 100644 index 61b33e14609e..000000000000 --- a/pkgs/by-name/no/notion-app/sources.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "x86_64-darwin": { - "version": "7.25.1", - "url": "https://desktop-release.notion-static.com/Notion-7.25.1.zip", - "hash": "sha512-HBhe2onWY44JbMVIfiLglyNDk1tqepwCerqbgUuI56mstBlg+B0KuepTl+plJODoTVtRasmrg/WRBw+ESWpEeg==" - }, - "aarch64-darwin": { - "version": "7.25.1", - "url": "https://desktop-release.notion-static.com/Notion-arm64-7.25.1.zip", - "hash": "sha512-1t+hNS33R3CX+inR8ArKvm4LDn0Wu7JiCU91ucnaAgQm85XUcWFdxk/f421M9XqG1Wte+webFX45LXDlixKa2A==" - } -} diff --git a/pkgs/by-name/no/notion-app/update/update.mjs b/pkgs/by-name/no/notion-app/update/update.mjs index a4d56e8ff3d8..c6a7e3e4baf9 100755 --- a/pkgs/by-name/no/notion-app/update/update.mjs +++ b/pkgs/by-name/no/notion-app/update/update.mjs @@ -23,15 +23,10 @@ const __dirname = import.meta.dirname; hash: `sha512-${string}`; }} Info */ -/** @typedef {{ - "x86_64-darwin": Info; - "aarch64-darwin": Info; -}} InfoMap */ - const BASE_URL = "https://desktop-release.notion-static.com/"; /** * - * @param {"latest-mac.yml" | "arm64-mac.yml"} liveCheckFile + * @param {"arm64-mac.yml"} liveCheckFile * @returns {Promise} */ async function getInfo(liveCheckFile) { @@ -57,26 +52,20 @@ async function getInfo(liveCheckFile) { } async function main() { - const filePath = path.join(__dirname, "../sources.json"); - /** @type {InfoMap} */ + const filePath = path.join(__dirname, "../source.json"); + /** @type {Info} */ const oldInfo = JSON.parse( await fsPromises.readFile(filePath, { encoding: "utf-8" }) ); - /** @type {InfoMap} */ - const info = { - "x86_64-darwin": await getInfo("latest-mac.yml"), - "aarch64-darwin": await getInfo("arm64-mac.yml"), - }; + /** @type {Info} */ + const info = await getInfo("arm64-mac.yml"); if (JSON.stringify(oldInfo) === JSON.stringify(info)) { console.log("[update] No updates found"); return; } - const platforms = /** @type {const} */ (["x86_64-darwin", "aarch64-darwin"]); - for (const platform of platforms) { - console.log( - `[update] Updating Notion ${platform} ${oldInfo[platform].version} -> ${info[platform].version}` - ); - } + console.log( + `[update] Updating Notion ${oldInfo.version} -> ${info.version}` + ); await fsPromises.writeFile( filePath, JSON.stringify(info, null, 2) + "\n",