{
 "app_id": "net.ankiweb.Anki",
 "source_url": "https://raw.githubusercontent.com/flathub/net.ankiweb.Anki/master/net.ankiweb.Anki.yaml",
 "runtime": "org.kde.Platform",
 "runtime_version": "6.11",
 "sdk": "org.kde.Sdk",
 "finish_args": [
  "--share=ipc",
  "--share=network",
  "--socket=fallback-x11",
  "--socket=pulseaudio",
  "--socket=wayland",
  "--device=dri",
  "--filesystem=xdg-config/kdeglobals:ro",
  "--talk-name=com.canonical.AppMenu.Registrar",
  "--talk-name=org.kde.kconfig.notify",
  "--talk-name=org.kde.KGlobalSettings"
 ],
 "module_count": 10,
 "fetched_at": "2026-09-17T16:13:16.702166+00:00",
 "manifest": {
  "app-id": "net.ankiweb.Anki",
  "runtime": "org.kde.Platform",
  "runtime-version": "6.11",
  "sdk": "org.kde.Sdk",
  "sdk-extensions": [
   "org.freedesktop.Sdk.Extension.rust-stable",
   "org.freedesktop.Sdk.Extension.node24"
  ],
  "base": "com.riverbankcomputing.PyQt.BaseApp",
  "base-version": "6.11",
  "cleanup-commands": [
   "/app/cleanup-BaseApp.sh"
  ],
  "build-options": {
   "append-path": "/usr/lib/sdk/rust-stable/bin:/usr/lib/sdk/node24/bin",
   "env": {
    "npm_config_nodedir": "/usr/lib/sdk/node24"
   }
  },
  "add-extensions": {
   "org.freedesktop.Sdk.Extension.texlive": {
    "version": "25.08",
    "directory": "texlive",
    "add-ld-path": "lib",
    "no-autodownload": true
   }
  },
  "command": "anki",
  "rename-desktop-file": "anki.desktop",
  "rename-icon": "anki",
  "finish-args": [
   "--socket=wayland",
   "--socket=fallback-x11",
   "--share=ipc",
   "--device=dri",
   "--socket=pulseaudio",
   "--share=network",
   "--env=TMPDIR=/var/tmp",
   "--env=IBUS_USE_PORTAL=1",
   "--env=PATH=/app/bin:/usr/bin:/app/texlive/bin/x86_64-linux:/app/texlive/bin/aarch64-linux",
   "--env=QTWEBENGINEPROCESS_PATH=/app/bin/QtWebEngineProcess",
   "--env=QT_SCALE_FACTOR_ROUNDING_POLICY=round"
  ],
  "cleanup": [
   "*.a",
   "*.la",
   "/include",
   "/etc",
   "/man",
   "/lib/pkgconfig",
   "/lib/metatypes",
   "/share/bash-completion",
   "/share/doc",
   "/share/man",
   "/share/zsh"
  ],
  "modules": [
   {
    "name": "texlive",
    "buildsystem": "simple",
    "build-commands": [
     "install -d /app/texlive"
    ]
   },
   {
    "name": "mpv",
    "buildsystem": "meson",
    "config-opts": [
     "-Dbuild-date=false",
     "-Dlibmpv=false",
     "-Dmanpage-build=disabled",
     "-Dx11=enabled"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/mpv-player/mpv/archive/refs/tags/v0.41.0.tar.gz",
      "sha256": "ee21092a5ee427353392360929dc64645c54479aefdb5babc5cfbb5fad626209",
      "x-checker-data": {
       "type": "anitya",
       "project-id": 5348,
       "stable-only": true,
       "url-template": "https://github.com/mpv-player/mpv/archive/refs/tags/v$version.tar.gz"
      }
     }
    ],
    "modules": [
     {
      "name": "libplacebo",
      "buildsystem": "meson",
      "config-opts": [
       "-Ddemos=false"
      ],
      "cleanup": [
       "/include",
       "/lib/pkgconfig"
      ],
      "sources": [
       {
        "type": "git",
        "url": "https://github.com/haasn/libplacebo.git",
        "tag": "v7.360.1",
        "commit": "cee9b076f2c63104ccfd497fa79c39a867293ec4",
        "x-checker-data": {
         "type": "git",
         "tag-pattern": "^v([\\d.]+)$"
        }
       }
      ]
     },
     {
      "name": "libass",
      "config-opts": [
       "--disable-static"
      ],
      "sources": [
       {
        "type": "archive",
        "url": "https://github.com/libass/libass/releases/download/0.17.4/libass-0.17.4.tar.xz",
        "sha256": "78f1179b838d025e9c26e8fef33f8092f65611444ffa1bfc0cfac6a33511a05a",
        "x-checker-data": {
         "type": "anitya",
         "project-id": 1560,
         "stable-only": true,
         "url-template": "https://github.com/libass/libass/releases/download/$version/libass-$version.tar.xz"
        }
       }
      ]
     },
     {
      "name": "libxpresent",
      "buildsystem": "autotools",
      "sources": [
       {
        "type": "archive",
        "url": "https://xorg.freedesktop.org/releases/individual/lib/libXpresent-1.0.2.tar.xz",
        "sha256": "4e5b21b4812206a4b223013606ae31170502c1043038777a1ef8f70c09d37602"
       }
      ]
     }
    ]
   },
   {
    "name": "rsync-bin",
    "sources": [
     {
      "type": "archive",
      "url": "https://download.samba.org/pub/rsync/src/rsync-3.4.4.tar.gz",
      "sha256": "bd88cf82fa653da32314fb229136407c5c90f80d1758d8f4b091767877d8fa96",
      "x-checker-data": {
       "type": "anitya",
       "project-id": 4217,
       "versions": {
        "<": "4.0"
       },
       "url-template": "https://download.samba.org/pub/rsync/src/rsync-$version.tar.gz"
      }
     }
    ],
    "cleanup": [
     "*"
    ]
   },
   {
    "name": "maturin-bin",
    "buildsystem": "simple",
    "build-commands": [
     "pip3 install --verbose --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"maturin\" --no-build-isolation"
    ],
    "sources": [
     {
      "type": "file",
      "url": "https://files.pythonhosted.org/packages/40/79/15957eb4e055597f217e6310963a9c1371372e63c5b4a3e30803365addd2/maturin-1.14.0-py3-none-manylinux_2_12_x86_64.manylinux2010_x86_64.musllinux_1_1_x86_64.whl",
      "sha256": "75bcd4468a7fe597652cc2980c6bb16ce4bb8c411e3eb85dac2c4418cef0e95a",
      "only-arches": [
       "x86_64"
      ],
      "x-checker-data": {
       "type": "json",
       "url": "https://pypi.org/pypi/maturin/json",
       "version-query": ".info.version",
       "url-query": ".releases | .[$version][] | select(.filename==\"maturin-\" + $version + \"-py3-none-manylinux_2_12_x86_64.manylinux2010_x86_64.musllinux_1_1_x86_64.whl\") | .url"
      }
     },
     {
      "type": "file",
      "url": "https://files.pythonhosted.org/packages/3e/4b/d1822f88cd5e855640f0e10ee00c39b9be614c1ef2f827e9792332d94b9f/maturin-1.14.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.musllinux_1_1_aarch64.whl",
      "sha256": "2d123337e817f8dfe23755d6760139c01104137bb63e9e20c289c547e25ec857",
      "only-arches": [
       "aarch64"
      ],
      "x-checker-data": {
       "type": "json",
       "url": "https://pypi.org/pypi/maturin/json",
       "version-query": ".info.version",
       "url-query": ".releases | .[$version][] | select(.filename==\"maturin-\" + $version + \"-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.musllinux_1_1_aarch64.whl\") | .url"
      }
     }
    ],
    "cleanup": [
     "*"
    ]
   },
   {
    "name": "uv-bin",
    "buildsystem": "simple",
    "build-commands": [
     "pip3 install --verbose --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"uv\" --no-build-isolation"
    ],
    "sources": [
     {
      "type": "file",
      "url": "https://files.pythonhosted.org/packages/d2/dc/4eeb6d05aa5e4507dfbe4784e1c5ecd96cb317dfe2e141f36231c3db1758/uv-0.11.22-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
      "sha256": "daaa65c5246e70e934df970aee04454c120f11bab09ce2634c5184bf1f16fe61",
      "only-arches": [
       "x86_64"
      ],
      "x-checker-data": {
       "type": "json",
       "url": "https://pypi.org/pypi/uv/json",
       "version-query": ".info.version",
       "url-query": ".releases | .[$version][] | select(.filename==\"uv-\" + $version + \"-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\") | .url"
      }
     },
     {
      "type": "file",
      "url": "https://files.pythonhosted.org/packages/03/ec/6663d99bb2cd94bba816769dcb4e784b9742ef62ca377d3b15db27fc0408/uv-0.11.22-py3-none-manylinux_2_28_aarch64.whl",
      "sha256": "5ec90d63a9f5f9894a8334612365daa2aba185f80ef530696afce23c1a18b711",
      "only-arches": [
       "aarch64"
      ],
      "x-checker-data": {
       "type": "json",
       "url": "https://pypi.org/pypi/uv/json",
       "version-query": ".info.version",
       "url-query": ".releases | .[$version][] | select(.filename==\"uv-\" + $version + \"-py3-none-manylinux_2_28_aarch64.whl\") | .url"
      }
     }
    ],
    "cleanup": [
     "*"
    ]
   },
   "python3-modules.json",
   {
    "name": "anki",
    "buildsystem": "simple",
    "build-options": {
     "env": {
      "OFFLINE_BUILD": "1",
      "RELEASE": "2",
      "PYTHON_BINARY": "/usr/bin/python",
      "NODE_BINARY": "/usr/lib/sdk/node24/bin/node",
      "ANKI_YARN_BINARY": "/run/build/anki/yarn.cjs",
      "YARN_GLOBAL_FOLDER": "/run/build/anki/flatpak-node/yarn-berry",
      "YARN_ENABLE_GLOBAL_CACHE": "0",
      "YARN_ENABLE_NETWORK": "0",
      "PROTOC_BINARY": "/run/build/anki/protoc",
      "CARGO_HOME": "/run/build/anki/cargo",
      "XDG_CACHE_HOME": "/run/build/anki/flatpak-node/cache",
      "UV_BINARY": "/app/bin/uv",
      "UV_PYTHON": "/usr/bin/python",
      "UV_OFFLINE": "1"
     }
    },
    "build-commands": [
     "mkdir -p out/pyenv/bin",
     "ln -s $PYTHON_BINARY out/pyenv/bin/python",
     "cargo fetch --manifest-path ./Cargo.toml",
     "mkdir out/node_modules",
     "ln -sf out/node_modules ./",
     "sed --in-place 's/configuration.get(`lockfileFilename`)/\"yarn.lock\"/g' $FLATPAK_BUILDER_BUILDDIR/flatpak-node/flatpak-yarn.js",
     "sed --in-place 's/\"type\": \"module\",/\"type\": \"module\"/' package.json",
     "sed --in-place '/packageManager/d' package.json",
     "chmod +x yarn.cjs",
     "sed --in-place '/npmMinimalAgeGate/d' .yarnrc.yml",
     "./yarn.cjs config",
     "./yarn.cjs plugin import $FLATPAK_BUILDER_BUILDDIR/flatpak-node/flatpak-yarn.js",
     "./yarn.cjs convertToZip ./yarn.cjs",
     "./yarn.cjs install",
     "./ninja wheels",
     "for f in out/wheels/*.whl; do python -m installer --prefix=\"/app\" $f; done",
     "install -Dm644 \"./qt/installer/linux-template/{{ cookiecutter.format }}/{{ cookiecutter.app_name }}/anki.desktop\" /app/share/applications",
     "install -Dm644 net.ankiweb.Anki.metainfo.xml /app/share/metainfo",
     "install -Dm644 \"./qt/installer/linux-template/{{ cookiecutter.format }}/{{ cookiecutter.app_name }}/anki.xml\" /app/share/mime/packages/net.ankiweb.Anki.xml",
     "install -Dm644 anki.svg /app/share/icons/hicolor/scalable/apps"
    ],
    "cleanup": [
     "/share/pixmaps"
    ],
    "sources": [
     "cargo-sources.json",
     "yarn-sources.json",
     {
      "type": "archive",
      "url": "https://github.com/protocolbuffers/protobuf/releases/download/v35.1/protoc-35.1-linux-aarch_64.zip",
      "sha256": "01bf9d08808c7f96678b63f4bd8efa559bb4f83d5a7a270d5edaf507f9d5d9cf",
      "only-arches": [
       "aarch64"
      ],
      "x-checker-data": {
       "type": "anitya",
       "project-id": 3715,
       "url-template": "https://github.com/protocolbuffers/protobuf/releases/download/v$version/protoc-$version-linux-aarch_64.zip"
      }
     },
     {
      "type": "archive",
      "url": "https://github.com/protocolbuffers/protobuf/releases/download/v35.1/protoc-35.1-linux-x86_64.zip",
      "sha256": "6930ebf62bd4ea607b98fff052596c6ee564b9835b4ce172c75a3f53ae9d91b7",
      "only-arches": [
       "x86_64"
      ],
      "x-checker-data": {
       "type": "anitya",
       "project-id": 3715,
       "url-template": "https://github.com/protocolbuffers/protobuf/releases/download/v$version/protoc-$version-linux-x86_64.zip"
      }
     },
     {
      "type": "file",
      "url": "https://raw.githubusercontent.com/yarnpkg/berry/refs/tags/%40yarnpkg/cli/4.11.0/packages/yarnpkg-cli/bin/yarn.js",
      "sha256": "b0efc6597348fab50c777d2ff4b09e814974058cf012c3d687c9e80bca824358",
      "dest-filename": "yarn.cjs",
      "x-checker-data": {
       "type": "git",
       "tag-pattern": "^v([\\d.]+)$"
      }
     },
     {
      "type": "git",
      "url": "https://github.com/ankitects/anki.git",
      "tag": "26.09",
      "commit": "e62e773905ed4f7c1439106247f5885ac79d598c",
      "x-checker-data": {
       "type": "json",
       "url": "https://api.github.com/repos/ankitects/anki/releases/latest",
       "tag-query": ".tag_name"
      }
     },
     {
      "type": "patch",
      "paths": [
       "no-update-check.patch",
       "strip-python-formatter.patch",
       "python-build-fixes.patch",
       "desktop-file-name.patch",
       "yarn-4-fixes.patch",
       "strip-mpv-ytdl.patch"
      ]
     },
     {
      "type": "inline",
      "contents": "hatchling @ ./hatchling-1.30.1-py3-none-any.whl\npackaging @ ./packaging-26.2-py3-none-any.whl\npathspec @ ./pathspec-1.1.1-py3-none-any.whl\npluggy @ ./pluggy-1.6.0-py3-none-any.whl\ntrove-classifiers @ ./trove_classifiers-2026.6.1.19-py3-none-any.whl\n",
      "dest-filename": "uv-constraints.txt"
     },
     {
      "type": "file",
      "url": "https://files.pythonhosted.org/packages/56/49/2797ec0ef88008a653a8867bb8d1e5c223cd2df8e40390dd5c6a0279cbc5/hatchling-1.30.1-py3-none-any.whl",
      "sha256": "161eacafb3c6f91526e92116d21426369f2c36e98c36a864f11a96345ad4ee31",
      "x-checker-data": {
       "type": "pypi",
       "name": "hatchling",
       "packagetype": "bdist_wheel"
      }
     },
     {
      "type": "file",
      "url": "https://files.pythonhosted.org/packages/df/b2/87e62e8c3e2f4b32e5fe99e0b86d576da1312593b39f47d8ceef365e95ed/packaging-26.2-py3-none-any.whl",
      "sha256": "5fc45236b9446107ff2415ce77c807cee2862cb6fac22b8a73826d0693b0980e",
      "x-checker-data": {
       "type": "pypi",
       "name": "packaging",
       "packagetype": "bdist_wheel"
      }
     },
     {
      "type": "file",
      "url": "https://files.pythonhosted.org/packages/f1/d9/7fb5aa316bc299258e68c73ba3bddbc499654a07f151cba08f6153988714/pathspec-1.1.1-py3-none-any.whl",
      "sha256": "a00ce642f577bf7f473932318056212bc4f8bfdf53128c78bbd5af0b9b20b189",
      "x-checker-data": {
       "type": "pypi",
       "name": "pathspec",
       "packagetype": "bdist_wheel"
      }
     },
     {
      "type": "file",
      "url": "https://files.pythonhosted.org/packages/54/20/4d324d65cc6d9205fabedc306948156824eb9f0ee1633355a8f7ec5c66bf/pluggy-1.6.0-py3-none-any.whl",
      "sha256": "e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746",
      "x-checker-data": {
       "type": "pypi",
       "name": "pluggy",
       "packagetype": "bdist_wheel"
      }
     },
     {
      "type": "file",
      "url": "https://files.pythonhosted.org/packages/7c/a4/81502f486f01db95bc8320646a8a12511f5e556cb63d5e224d91816605c4/trove_classifiers-2026.6.1.19-py3-none-any.whl",
      "sha256": "ab4c4ec93cc4a4e7815fa759906e05e6bb3f2fbd92ea0f897288c6a43efd15b3",
      "x-checker-data": {
       "type": "pypi",
       "name": "trove_classifiers",
       "packagetype": "bdist_wheel"
      }
     },
     {
      "type": "file",
      "path": "net.ankiweb.Anki.metainfo.xml"
     },
     {
      "type": "file",
      "path": "anki.svg"
     }
    ]
   }
  ]
 }
}