{
 "app_id": "com.notesnook.Notesnook",
 "source_url": "https://raw.githubusercontent.com/flathub/com.notesnook.Notesnook/master/com.notesnook.Notesnook.yml",
 "runtime": "org.freedesktop.Platform",
 "runtime_version": "24.08",
 "sdk": "org.freedesktop.Sdk",
 "finish_args": [
  "--share=ipc",
  "--share=network",
  "--socket=fallback-x11",
  "--socket=pulseaudio",
  "--socket=wayland",
  "--device=dri",
  "--filesystem=xdg-documents/Notesnook:create",
  "--talk-name=org.kde.StatusNotifierWatcher",
  "--talk-name=org.freedesktop.Notifications"
 ],
 "module_count": 1,
 "fetched_at": "2026-09-17T16:08:28.025840+00:00",
 "manifest": {
  "app-id": "com.notesnook.Notesnook",
  "runtime": "org.freedesktop.Platform",
  "runtime-version": "24.08",
  "sdk": "org.freedesktop.Sdk",
  "base": "org.electronjs.Electron2.BaseApp",
  "base-version": "24.08",
  "sdk-extensions": [
   "org.freedesktop.Sdk.Extension.node22"
  ],
  "command": "start-notesnook",
  "separate-locales": false,
  "finish-args": [
   "--share=ipc",
   "--socket=wayland",
   "--socket=fallback-x11",
   "--socket=pulseaudio",
   "--device=dri",
   "--share=network",
   "--filesystem=xdg-documents/Notesnook:create",
   "--talk-name=org.kde.StatusNotifierWatcher",
   "--talk-name=org.freedesktop.Notifications",
   "--env=XCURSOR_PATH=/run/host/user-share/icons:/run/host/share/icons"
  ],
  "build-options": {
   "append-path": "/usr/lib/sdk/node22/bin",
   "env": {
    "NPM_CONFIG_LOGLEVEL": "info"
   }
  },
  "modules": [
   {
    "name": "notesnook",
    "buildsystem": "simple",
    "build-options": {
     "env": {
      "XDG_CACHE_HOME": "/run/build/notesnook/flatpak-node/cache",
      "npm_config_cache": "/run/build/notesnook/flatpak-node/npm-cache",
      "npm_config_offline": "true",
      "npm_config_runtime": "electron",
      "npm_config_nodedir": "/run/build/notesnook/flatpak-node/cache/node-gyp/37.10.3"
     }
    },
    "build-commands": [
     "./flatpak-node/electron-builder-arch-args.sh",
     "set -e\n\nnpm install --omit=dev --offline --ignore-scripts\n\nnpm run bootstrap -- --scope=desktop\n\ncd apps/desktop/\n\nnpm i --offline --legacy-peer-deps --ignore-scripts\n\nnpx patch-package\n\nnpx --offline electron-builder --config electron-builder.config.js $ELECTRON_BUILDER_ARCH_ARGS --linux --dir\n\n# Bundle app and dependencies\ncp -r output/linux-*unpacked/* /app/bin/\n",
     "install -Dm 755 start-notesnook.sh /app/bin/start-notesnook"
    ],
    "post-install": [
     "install -Dm644 ./apps/desktop/assets/icons/16x16.png /app/share/icons/hicolor/16x16/apps/$FLATPAK_ID.png",
     "install -Dm644 ./apps/desktop/assets/icons/24x24.png  /app/share/icons/hicolor/24x24/apps/$FLATPAK_ID.png",
     "install -Dm644 ./apps/desktop/assets/icons/32x32.png  /app/share/icons/hicolor/32x32/apps/$FLATPAK_ID.png",
     "install -Dm644 ./apps/desktop/assets/icons/64x64.png  /app/share/icons/hicolor/64x64/apps/$FLATPAK_ID.png",
     "install -Dm644 ./apps/desktop/assets/icons/48x48.png  /app/share/icons/hicolor/48x48/apps/$FLATPAK_ID.png",
     "install -Dm644 ./apps/desktop/assets/icons/128x128.png  /app/share/icons/hicolor/128x128/apps/$FLATPAK_ID.png",
     "install -Dm644 ./apps/desktop/assets/icons/256x256.png  /app/share/icons/hicolor/256x256/apps/$FLATPAK_ID.png",
     "install -Dm644 ./apps/desktop/assets/icons/512x512.png  /app/share/icons/hicolor/512x512/apps/$FLATPAK_ID.png",
     "install -D com.notesnook.Notesnook.desktop -t  /app/share/applications/",
     "install -D com.notesnook.Notesnook.metainfo.xml -t  /app/share/metainfo/"
    ],
    "sources": [
     "generated-sources.json",
     {
      "type": "git",
      "url": "https://github.com/streetwriters/notesnook",
      "commit": "db7271623466aec731f4b2da3417f7fb37a5033f",
      "tag": "v3.4.6",
      "x-checker-data": {
       "type": "git",
       "tag-pattern": "^v([\\d.]+)$"
      }
     },
     {
      "type": "archive",
      "url": "https://github.com/streetwriters/notesnook/releases/download/v3.4.6/notesnook_build_v3.4.6.zip",
      "sha256": "c02736afe7a252fe1dc60ad5de834f3c738847eac857b4129e81200ad18e4c9a",
      "strip-components": 0,
      "x-checker-data": {
       "type": "json",
       "url": "https://api.github.com/repos/streetwriters/notesnook/releases/latest",
       "version-query": ".tag_name",
       "url-query": "\"https://github.com/streetwriters/notesnook/releases/download/\" + $version + \"/notesnook_build_\" + $version + \".zip\""
      }
     },
     {
      "type": "patch",
      "path": "patches/electron-checksum-workaround.patch"
     },
     {
      "type": "file",
      "path": "com.notesnook.Notesnook.desktop"
     },
     {
      "type": "file",
      "path": "com.notesnook.Notesnook.metainfo.xml"
     },
     {
      "type": "script",
      "dest-filename": "start-notesnook.sh",
      "commands": [
       "export TMPDIR=\"$XDG_RUNTIME_DIR/app/$FLATPAK_ID\"",
       "zypak-wrapper.sh /app/bin/notesnook --ozone-platform-hint=auto --enable-features=WaylandWindowDecorations \"$@\""
      ]
     }
    ]
   }
  ]
 }
}