{
 "app_id": "net.cozic.joplin_desktop",
 "source_url": "https://raw.githubusercontent.com/flathub/net.cozic.joplin_desktop/master/net.cozic.joplin_desktop.yml",
 "runtime": "org.freedesktop.Platform",
 "runtime_version": "26.08",
 "sdk": "org.freedesktop.Sdk",
 "finish_args": [
  "--share=ipc",
  "--share=network",
  "--socket=cups",
  "--socket=fallback-x11",
  "--socket=pulseaudio",
  "--socket=wayland",
  "--device=dri",
  "--filesystem=home",
  "--talk-name=org.kde.StatusNotifierWatcher",
  "--talk-name=org.freedesktop.Notifications",
  "--talk-name=com.canonical.AppMenu.Registrar",
  "--talk-name=org.a11y.Bus",
  "--system-talk-name=org.freedesktop.Avahi"
 ],
 "module_count": 4,
 "fetched_at": "2026-09-21T13:18:22.444036+00:00",
 "manifest": {
  "app-id": "net.cozic.joplin_desktop",
  "runtime": "org.freedesktop.Platform",
  "runtime-version": "26.08",
  "sdk": "org.freedesktop.Sdk",
  "base": "org.electronjs.Electron2.BaseApp",
  "base-version": "26.08",
  "sdk-extensions": [
   "org.freedesktop.Sdk.Extension.node22"
  ],
  "separate-locales": false,
  "rename-icon": "joplin",
  "rename-desktop-file": "joplin.desktop",
  "command": "joplin-desktop",
  "finish-args": [
   "--socket=pulseaudio",
   "--socket=fallback-x11",
   "--socket=wayland",
   "--device=dri",
   "--share=ipc",
   "--share=network",
   "--filesystem=home",
   "--talk-name=org.freedesktop.Notifications",
   "--talk-name=org.kde.StatusNotifierWatcher",
   "--talk-name=com.canonical.AppMenu.Registrar",
   "--talk-name=org.a11y.Bus",
   "--socket=cups",
   "--system-talk-name=org.freedesktop.Avahi"
  ],
  "modules": [
   {
    "name": "rsync",
    "config-opts": [
     "--with-included-popt",
     "--disable-md2man"
    ],
    "cleanup": [
     "/share"
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/RsyncProject/rsync.git",
      "tag": "v3.4.1",
      "commit": "3305a7a063ab0167cab5bf7029da53abaa9fdb6e"
     }
    ]
   },
   {
    "name": "wasm-pack",
    "buildsystem": "simple",
    "cleanup": [
     "*"
    ],
    "build-commands": [
     "install -Dm755 wasm-pack /app/bin"
    ],
    "sources": [
     {
      "type": "archive",
      "only-arches": [
       "x86_64"
      ],
      "url": "https://github.com/rustwasm/wasm-pack/releases/download/v0.13.1/wasm-pack-v0.13.1-x86_64-unknown-linux-musl.tar.gz",
      "sha256": "c539d91ccab2591a7e975bcf82c82e1911b03335c80aa83d67ad25ed2ad06539"
     },
     {
      "type": "archive",
      "only-arches": [
       "aarch64"
      ],
      "url": "https://github.com/rustwasm/wasm-pack/releases/download/v0.13.1/wasm-pack-v0.13.1-aarch64-unknown-linux-musl.tar.gz",
      "sha256": "2e65038769f8bbaa5fc237ad4bb523e692df99458cbd3e3d92525b89d8762379"
     }
    ]
   },
   {
    "name": "joplin",
    "buildsystem": "simple",
    "build-options": {
     "append-path": "/usr/lib/sdk/node22/bin",
     "env": {
      "XDG_CACHE_HOME": "/run/build/joplin/flatpak-node/cache",
      "npm_config_nodedir": "/usr/lib/sdk/node22",
      "YARN_ENABLE_INLINE_BUILDS": "1",
      "YARN_ENABLE_TELEMETRY": "0",
      "YARN_ENABLE_NETWORK": "0",
      "YARN_ENABLE_GLOBAL_CACHE": "0",
      "SHARP_IGNORE_GLOBAL_LIBVIPS": "1",
      "YARN_GLOBAL_FOLDER": "/run/build/joplin/flatpak-node/yarn-berry",
      "TMPDIR": "/run/build/joplin/flatpak-tmp"
     }
    },
    "build-commands": [
     "yarn config",
     "yarn plugin import $FLATPAK_BUILDER_BUILDDIR/flatpak-node/flatpak-yarn.js",
     "yarn convertToZip $(which yarn)",
     "yarn install --mode=skip-build",
     "install -Dm755 /app/bin/wasm-pack -t packages/onenote-converter/node_modules/binary-install/node_modules/.bin",
     "install -Dm755 /app/bin/wasm-pack -t packages/onenote-converter/node_modules/wasm-pack/binary",
     "sed -i 's/git config/true||git config/g' packages/default-plugins/node_modules/joplin-plugin-freehand-drawing/package.json",
     "yarn rebuild",
     "yarn run postinstall",
     "mkdir -p packages/app-desktop/dist && touch packages/app-desktop/dist/AppImage",
     ". flatpak-node/electron-builder-arch-args.sh\ncd packages/app-desktop\nyarn run dist $ELECTRON_BUILDER_ARCH_ARGS --config.asar=false --config.electronDownload.isVerifyChecksum=\"false\" --linux --dir --publish=never\n",
     "cd packages/app-desktop\ncp -r dist/linux*unpacked /app/joplin-desktop\nmv /app/joplin-desktop/{@joplinapp-desktop,joplin}\nfor size in 16 32 64 128 256; do\n  [[ -e \"build/icons/${size}x${size}.png\" ]] && \\\n    install -Dm644 \"build/icons/${size}x${size}.png\" \\\n    \"/app/share/icons/hicolor/${size}x${size}/apps/joplin.png\";\ndone\n",
     "install -Dm755 joplin.desktop -t /app/share/applications",
     "install -Dm644 ${FLATPAK_ID}.appdata.xml -t /app/share/metainfo",
     "install -Dm755 joplin-desktop.sh /app/bin/joplin-desktop"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/laurent22/joplin/archive/v3.7.18.tar.gz",
      "sha256": "60eb34872a61efce325034ab1a052a0d37f9f0028b037d5482b1e649d8d63c4f",
      "x-checker-data": {
       "type": "json",
       "url": "https://api.github.com/repos/laurent22/joplin/releases/latest",
       "version-query": ".tag_name | sub(\"^v\"; \"\")",
       "url-query": "\"https://github.com/laurent22/joplin/archive/v\" + $version + \".tar.gz\"",
       "timestamp-query": ".published_at",
       "is-main-source": true
      }
     },
     {
      "type": "shell",
      "commands": [
       "jq '.desktopName = \"net.cozic.joplin_desktop\"' packages/app-desktop/package.json > package.json.tmp && mv package.json.tmp packages/app-desktop/package.json",
       "rm -rf packages/app-clipper",
       "cat packages/default-plugins/pluginRepositories.json | jq 'with_entries(select(.value.package))' > pluginRepositories.json",
       "mv pluginRepositories.json packages/default-plugins/pluginRepositories.json"
      ]
     },
     "generated-sources.json",
     {
      "type": "file",
      "path": "joplin.desktop"
     },
     {
      "type": "file",
      "path": "net.cozic.joplin_desktop.appdata.xml"
     },
     {
      "type": "script",
      "dest-filename": "joplin-desktop.sh",
      "commands": [
       "export TMPDIR=$XDG_RUNTIME_DIR/app/$FLATPAK_ID",
       "exec zypak-wrapper /app/joplin-desktop/joplin $wayland_opt \"$@\""
      ]
     }
    ]
   },
   {
    "name": "joplin-plugins",
    "buildsystem": "simple",
    "build-commands": [
     "install -Dm644 *.jpl -t /app/joplin-desktop/resources/build/defaultPlugins"
    ],
    "sources": [
     {
      "type": "file",
      "url": "https://github.com/JackGruber/joplin-plugin-backup/releases/download/v1.5.1/io.github.jackgruber.backup.jpl",
      "sha256": "21c8a86849aeeb2a2ebe717a7a5e97811f434d30574eb9a04cc29b692c7963dd",
      "x-checker-data": {
       "type": "json",
       "url": "https://api.github.com/repos/JackGruber/joplin-plugin-backup/releases/latest",
       "version-query": ".tag_name | sub(\"^v\"; \"\")",
       "url-query": "\"https://github.com/JackGruber/joplin-plugin-backup/releases/download/v\" + $version + \"/io.github.jackgruber.backup.jpl\"",
       "timestamp-query": ".published_at"
      }
     }
    ]
   }
  ]
 }
}