mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-19 07:01:12 +00:00
notion-app: drop x86_64-darwin support
This commit is contained in:
@@ -1,12 +1,5 @@
|
||||
{
|
||||
"x86_64-darwin": {
|
||||
"version": "4.24.0",
|
||||
"url": "https://desktop-release.notion-static.com/Notion-4.24.0.zip",
|
||||
"hash": "sha512-E/DXvtRD3HFNsliQqFpLG4xoAJIcqWX3xkLNTDMxy8bssc5V9/dN2K3AGLnN8HUj9+FwWySNCJhFPDqzf/nyTQ=="
|
||||
},
|
||||
"aarch64-darwin": {
|
||||
"version": "4.24.0",
|
||||
"url": "https://desktop-release.notion-static.com/Notion-arm64-4.24.0.zip",
|
||||
"hash": "sha512-b0zeG0dBPxMigOb+1o8riB3i9HbKdJ+oZYY02MILpIg70uUttq5f4j5ekZ8d5xwkIHGF9wqhqUddRdyb+qXxtw=="
|
||||
}
|
||||
"version": "4.24.0",
|
||||
"url": "https://desktop-release.notion-static.com/Notion-arm64-4.24.0.zip",
|
||||
"hash": "sha512-b0zeG0dBPxMigOb+1o8riB3i9HbKdJ+oZYY02MILpIg70uUttq5f4j5ekZ8d5xwkIHGF9wqhqUddRdyb+qXxtw=="
|
||||
}
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
unzip,
|
||||
}:
|
||||
let
|
||||
info =
|
||||
(lib.importJSON ./info.json)."${stdenvNoCC.hostPlatform.parsed.cpu.name}-darwin"
|
||||
or (throw "Unsupported CPU architecture: ${stdenvNoCC.hostPlatform.parsed.cpu.name}");
|
||||
info = lib.importJSON ./info.json;
|
||||
in
|
||||
stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
pname = "notion-app";
|
||||
@@ -34,7 +32,6 @@ stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
license = lib.licenses.unfree;
|
||||
maintainers = with lib.maintainers; [ xiaoxiangmoe ];
|
||||
platforms = [
|
||||
"x86_64-darwin"
|
||||
"aarch64-darwin"
|
||||
];
|
||||
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
|
||||
|
||||
@@ -23,11 +23,6 @@ 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/";
|
||||
/**
|
||||
*
|
||||
@@ -58,25 +53,19 @@ async function getInfo(liveCheckFile) {
|
||||
|
||||
async function main() {
|
||||
const filePath = path.join(__dirname, "../info.json");
|
||||
/** @type {InfoMap} */
|
||||
/** @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",
|
||||
|
||||
Reference in New Issue
Block a user