{
 "app_id": "io.github.shiftey.Desktop",
 "source_url": "https://raw.githubusercontent.com/flathub/io.github.shiftey.Desktop/master/io.github.shiftey.Desktop.yaml",
 "runtime": "org.freedesktop.Platform",
 "runtime_version": "25.08",
 "sdk": "org.freedesktop.Sdk",
 "finish_args": [
  "--share=network",
  "--share=ipc",
  "--socket=x11",
  "--socket=wayland",
  "--socket=fallback-x11",
  "--socket=ssh-auth",
  "--socket=gpg-agent",
  "--device=all",
  "--filesystem=xdg-run/keyring",
  "--filesystem=host",
  "--filesystem=/opt:ro",
  "--filesystem=/var/lib/flatpak/app:ro",
  "--talk-name=org.freedesktop.Flatpak",
  "--talk-name=org.freedesktop.Notifications",
  "--talk-name=org.gtk.vfs.*",
  "--talk-name=com.canonical.AppMenu.Registrar",
  "--talk-name=org.freedesktop.secrets"
 ],
 "module_count": 4,
 "fetched_at": "2026-09-17T16:12:12.238668+00:00",
 "manifest": {
  "app-id": "io.github.shiftey.Desktop",
  "base": "org.electronjs.Electron2.BaseApp",
  "base-version": "25.08",
  "runtime": "org.freedesktop.Platform",
  "runtime-version": "25.08",
  "sdk": "org.freedesktop.Sdk",
  "sdk-extensions": [
   "org.freedesktop.Sdk.Extension.node20"
  ],
  "command": "start-github-desktop",
  "separate-locales": false,
  "rename-icon": "io.github.shiftey.Desktop",
  "finish-args": [
   "--share=ipc",
   "--socket=fallback-x11",
   "--socket=wayland",
   "--socket=ssh-auth",
   "--socket=gpg-agent",
   "--share=network",
   "--device=all",
   "--filesystem=host",
   "--filesystem=/opt/:ro",
   "--filesystem=/var/lib/flatpak/app:ro",
   "--filesystem=xdg-run/keyring",
   "--talk-name=org.freedesktop.Flatpak",
   "--talk-name=org.freedesktop.secrets",
   "--talk-name=org.freedesktop.Notifications",
   "--talk-name=org.gtk.vfs.*",
   "--talk-name=com.canonical.AppMenu.Registrar",
   "--env=FLATPAK_HOST=1",
   "--env=ELECTRON_TRASH=gio",
   "--env=ELECTRON_OZONE_PLATFORM_HINT=auto"
  ],
  "modules": [
   "shared-modules/libsecret/libsecret.json",
   {
    "name": "gpg",
    "config-opts": [
     "--disable-doc",
     "--enable-gpg-is-gpg2",
     "--disable-tests"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://gnupg.org/ftp/gcrypt/gnupg/gnupg-2.4.7.tar.bz2",
      "sha256": "7b24706e4da7e0e3b06ca068231027401f238102c41c909631349dcc3b85eb46"
     }
    ]
   },
   {
    "name": "node-gyp",
    "buildsystem": "simple",
    "build-commands": [
     "install -Dm755  node-gyp /app/bin"
    ],
    "cleanup": [
     "*"
    ],
    "sources": [
     {
      "type": "script",
      "dest-filename": "node-gyp",
      "commands": [
       "node /usr/lib/sdk/node20/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js $@"
      ]
     }
    ]
   },
   {
    "name": "github-desktop",
    "buildsystem": "simple",
    "build-options": {
     "append-path": "/app/bin:/usr/lib/sdk/node20/bin:/run/build/github-desktop/flatpak-node/chromedriver:/usr/lib/sdk/node20/lib/node_modules/npm/node_modules/node-gyp/bin",
     "env": {
      "npm_config_nodedir": "/usr/lib/sdk/node20",
      "ELECTRON_CACHE": "/run/build/github-desktop/flatpak-node/electron-cache",
      "ELECTRON_SKIP_BINARY_DOWNLOAD": "1",
      "OFFLINE": "1",
      "CHROMEDRIVER_SKIP_DOWNLOAD": "true",
      "TMPDIR": "/run/build/github-desktop/flatpak-node/tmp",
      "XDG_CACHE_HOME": "/run/build/github-desktop/flatpak-node/cache"
     }
    },
    "build-commands": [
     "HOME=$PWD node ./vendor/yarn-1.21.1.js config --offline set yarn-offline-mirror $FLATPAK_BUILDER_BUILDDIR/flatpak-node/yarn-mirror",
     "ln -s $XDG_CACHE_HOME/node-gyp $HOME/.electron-gyp",
     "node ./vendor/yarn-1.21.1.js --offline --verbose",
     ". flatpak-node/electron-builder-arch-args.sh; node ./vendor/yarn-1.21.1.js run --offline build:prod $ELECTRON_BUILDER_ARCH_ARGS",
     "cp -r dist/github-desktop-linux-* /app/github-desktop",
     "install -Dm755 start-github-desktop.sh /app/bin/start-github-desktop"
    ],
    "post-install": [
     "install -D io.github.shiftey.Desktop.desktop -t  /app/share/applications/",
     "install -D io.github.shiftey.Desktop.metainfo.xml -t  /app/share/metainfo/",
     "install -Dm644 app/static/linux/logos/32x32.png  /app/share/icons/hicolor/32x32/apps/$FLATPAK_ID.png",
     "install -Dm644 app/static/linux/logos/64x64.png  /app/share/icons/hicolor/64x64/apps/$FLATPAK_ID.png",
     "install -Dm644 app/static/linux/logos/128x128.png  /app/share/icons/hicolor/128x128/apps/$FLATPAK_ID.png",
     "install -Dm644 app/static/linux/logos/256x256.png  /app/share/icons/hicolor/256x256/apps/$FLATPAK_ID.png",
     "install -Dm644 app/static/linux/logos/512x512.png  /app/share/icons/hicolor/512x512/apps/$FLATPAK_ID.png"
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/shiftkey/desktop.git",
      "tag": "release-3.4.13-linux1",
      "commit": "2b2484a3d4b439b36e43c207013252e1ac859bb0",
      "x-checker-data": {
       "type": "git",
       "tag-pattern": "release-(\\d+\\.\\d+\\.\\d+-linux\\d+)"
      }
     },
     {
      "type": "patch",
      "path": "node_options.patch"
     },
     "generated-sources.json",
     {
      "type": "file",
      "path": "io.github.shiftey.Desktop.desktop"
     },
     {
      "type": "file",
      "path": "io.github.shiftey.Desktop.metainfo.xml"
     },
     {
      "type": "script",
      "dest-filename": "start-github-desktop.sh",
      "commands": [
       "export TMPDIR=$XDG_RUNTIME_DIR/app/$FLATPAK_ID",
       "exec zypak-wrapper /app/github-desktop/github-desktop \"$@\""
      ]
     }
    ]
   }
  ]
 }
}