{
 "app_id": "io.gpt4all.gpt4all",
 "source_url": "https://raw.githubusercontent.com/flathub/io.gpt4all.gpt4all/master/io.gpt4all.gpt4all.yml",
 "runtime": "org.kde.Platform",
 "runtime_version": "6.10",
 "sdk": "org.kde.Sdk",
 "finish_args": [
  "--share=ipc",
  "--share=network",
  "--socket=fallback-x11",
  "--socket=wayland",
  "--device=dri",
  "--filesystem=xdg-documents:ro",
  "--filesystem=xdg-config/kdeglobals:ro",
  "--talk-name=com.canonical.AppMenu.Registrar",
  "--talk-name=org.kde.kconfig.notify",
  "--talk-name=org.kde.KGlobalSettings"
 ],
 "module_count": 9,
 "fetched_at": "2026-09-17T16:12:45.977697+00:00",
 "manifest": {
  "app-id": "io.gpt4all.gpt4all",
  "runtime": "org.kde.Platform",
  "runtime-version": "6.10",
  "sdk": "org.kde.Sdk",
  "base": "io.qt.qtwebengine.BaseApp",
  "base-version": "6.10",
  "cleanup-commands": [
   "/app/cleanup-BaseApp.sh"
  ],
  "finish-args": [
   "--share=ipc",
   "--socket=wayland",
   "--socket=fallback-x11",
   "--share=network",
   "--device=dri",
   "--filesystem=xdg-documents:ro"
  ],
  "command": "chat",
  "cleanup": [
   "/include",
   "*.a"
  ],
  "modules": [
   {
    "name": "qthttpserver",
    "buildsystem": "cmake-ninja",
    "builddir": true,
    "post-install": [
     "ln -s ${FLATPAK_ARCH}-linux-gnu/libQt6HttpServer.so  /app/lib/",
     "ln -s ${FLATPAK_ARCH}-linux-gnu/libQt6HttpServer.so.6  /app/lib/",
     "ln -s ${FLATPAK_ARCH}-linux-gnu/libQt6HttpServer.so.6.10.3 /app/lib/"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://invent.kde.org/qt/qt/qthttpserver/-/archive/v6.10.3/qthttpserver-v6.10.3.zip",
      "sha256": "2f7573e8ee0b47ff7c2c0e691f7b041a0b8b17c5343ef018ea9457937af490bc",
      "x-checker-data": {
       "type": "git",
       "tag-pattern": "^v([\\d.]+)$"
      }
     }
    ]
   },
   {
    "name": "python-html5lib",
    "buildsystem": "simple",
    "build-commands": [
     "pip3 install --verbose --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"html5lib\" --no-build-isolation"
    ],
    "sources": [
     {
      "type": "file",
      "url": "https://files.pythonhosted.org/packages/77/c6/040cbc72480d789a5f40d63fb484d3106554c4dfa2d2b70ad5022057750f/webencodings-0.6.1-py3-none-any.whl",
      "sha256": "7fab6269c8bf237c657876b52058ccb182e861518d1c695c1a9aaa8c1c105d5b",
      "x-checker-data": {
       "type": "pypi",
       "name": "webencodings",
       "packagetype": "bdist_wheel"
      }
     },
     {
      "type": "file",
      "url": "https://files.pythonhosted.org/packages/6c/dd/a834df6482147d48e225a49515aabc28974ad5a4ca3215c18a882565b028/html5lib-1.1-py2.py3-none-any.whl",
      "sha256": "0d78f8fde1c230e99fe37986a60526d7049ed4bf8a9fadbad5f00e22e58e041d",
      "x-checker-data": {
       "type": "pypi",
       "name": "html5lib",
       "packagetype": "bdist_wheel"
      }
     },
     {
      "type": "file",
      "url": "https://files.pythonhosted.org/packages/b7/ce/149a00dd41f10bc29e5921b496af8b574d8413afcd5e30dfa0ed46c2cc5e/six-1.17.0-py2.py3-none-any.whl",
      "sha256": "4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274"
     }
    ],
    "cleanup": [
     "*"
    ]
   },
   {
    "name": "volk",
    "buildsystem": "cmake-ninja",
    "builddir": true,
    "config-opts": [
     "-DVOLK_INSTALL=ON"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/zeux/volk/archive/refs/tags/vulkan-sdk-1.3.280.0.zip",
      "sha256": "178875134d36e8b90f7e3ec31171355df3b71f47eba49cca2f98158e6552b011"
     }
    ]
   },
   {
    "name": "vulkan-headers",
    "buildsystem": "cmake-ninja",
    "builddir": true,
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/KhronosGroup/Vulkan-Headers/archive/refs/tags/v1.3.283.zip",
      "sha256": "2094159c87fb4b6d8f734bd4cad59564cef7ef32feb00cf6d8ca7e75a84df921"
     }
    ]
   },
   {
    "name": "vulkan-tools",
    "buildsystem": "cmake-ninja",
    "builddir": true,
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/KhronosGroup/Vulkan-Tools/archive/refs/tags/v1.3.283.zip",
      "sha256": "11ec6b474e91dc8cb6e7f22891294ede549bb6ed67c19d230e293b3fc9610883"
     }
    ]
   },
   {
    "name": "shaderc",
    "buildsystem": "cmake-ninja",
    "builddir": true,
    "config-opts": [
     "-DSHADERC_SKIP_COPYRIGHT_CHECK=ON",
     "-DSHADERC_SKIP_EXAMPLES=ON",
     "-DSHADERC_SKIP_TESTS=ON",
     "-DSPIRV_SKIP_EXECUTABLES=ON",
     "-DENABLE_GLSLANG_BINARIES=OFF"
    ],
    "cleanup": [
     "/bin",
     "/include",
     "/lib/cmake",
     "/lib/pkgconfig"
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/google/shaderc.git",
      "tag": "v2025.5",
      "commit": "c4b0af6c3664cd8b33ffddf452514e02a173b4d6"
     },
     {
      "type": "git",
      "url": "https://github.com/KhronosGroup/SPIRV-Tools.git",
      "commit": "262bdab48146c937467f826699a40da0fdfc0f1a",
      "dest": "third_party/spirv-tools"
     },
     {
      "type": "git",
      "url": "https://github.com/KhronosGroup/SPIRV-Headers.git",
      "commit": "b824a462d4256d720bebb40e78b9eb8f78bbb305",
      "dest": "third_party/spirv-headers"
     },
     {
      "type": "git",
      "url": "https://github.com/KhronosGroup/glslang.git",
      "commit": "7a47e2531cb334982b2a2dd8513dca0a3de4373d",
      "dest": "third_party/glslang"
     }
    ]
   },
   {
    "name": "fmt",
    "buildsystem": "cmake-ninja",
    "builddir": true,
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/fmtlib/fmt/releases/download/10.2.1/fmt-10.2.1.zip",
      "sha256": "312151a2d13c8327f5c9c586ac6cf7cddc1658e8f53edae0ec56509c8fa516c9"
     }
    ]
   },
   {
    "name": "cuda-toolkit",
    "only-arches": [
     "x86_64"
    ],
    "cleanup": [
     "/cuda"
    ],
    "buildsystem": "simple",
    "build-commands": [
     "ln -s /usr/lib/${FLATPAK_ARCH}-linux-gnu/libxml2.so.16 /app/lib/libxml2.so.2",
     "mkdir /app/cuda",
     "chmod +x ./cuda_toolkit.run",
     "./cuda_toolkit.run --silent --toolkit --toolkitpath=/app/cuda --no-opengl-libs --no-man-page --no-drm --tmpdir=$FLATPAK_BUILDER_BUILDDIR",
     "sed -i -e 's/rsqrt(double x);/rsqrt(double x) noexcept(true);/' -e 's/rsqrtf(float x);/rsqrtf(float x) noexcept(true);/' -e 's/__func__(double rsqrt(double a));/__func__(double rsqrt(double a) noexcept(true));/' -e 's/__func__(float rsqrtf(float a));/__func__(float rsqrtf(float a) noexcept(true));/' /app/cuda/targets/x86_64-linux/include/crt/math_functions.h",
     "test \"$(grep -c 'rsqrtf\\?(.*noexcept(true)' /app/cuda/targets/x86_64-linux/include/crt/math_functions.h)\" = 4",
     "mv /app/cuda/lib64/libcudart.* /app/lib/",
     "mv /app/cuda/lib64/libcublas* /app/lib/"
    ],
    "sources": [
     {
      "type": "file",
      "only-arches": [
       "x86_64"
      ],
      "url": "https://developer.download.nvidia.com/compute/cuda/13.1.0/local_installers/cuda_13.1.0_590.44.01_linux.run",
      "dest-filename": "cuda_toolkit.run",
      "sha256": "6b4fdf2694b3d7afbc526f26412b4cf4f050b202324455053307310f53b323a7"
     }
    ]
   },
   {
    "name": "gpt4all",
    "subdir": "gpt4all-chat",
    "builddir": true,
    "config-opts": [
     "-DKOMPUTE_OPT_USE_BUILT_IN_VULKAN_HEADER=OFF",
     "-DKOMPUTE_OPT_USE_BUILT_IN_FMT=OFF",
     "-DCMAKE_BUILD_TYPE=Release",
     "-DGPT4ALL_TEST=OFF",
     "-DCMAKE_CXX_STANDARD=17",
     "-DCMAKE_CXX_STANDARD_REQUIRED=ON",
     "-DCMAKE_C_STANDARD=17"
    ],
    "build-options": {
     "arch": {
      "x86_64": {
       "append-path": "/app/cuda/bin",
       "config-opts": [
        "-DCMAKE_CUDA_STANDARD=17",
        "-DCMAKE_CUDA_STANDARD_REQUIRED=ON",
        "-DCMAKE_CUDA_ARCHITECTURES=all-major"
       ]
      },
      "aarch64": {
       "config-opts": [
        "-DLLMODEL_CUDA=OFF"
       ]
      }
     }
    },
    "buildsystem": "cmake-ninja",
    "post-install": [
     "install -Dm644 ../icons/gpt4all.svg /app/share/icons/hicolor/scalable/apps/io.gpt4all.gpt4all.svg",
     "install -Dm644 ../flatpak-manifest/io.gpt4all.gpt4all.desktop /app/share/applications/io.gpt4all.gpt4all.desktop",
     "install -Dm644 ../flatpak-manifest/io.gpt4all.gpt4all.appdata.xml /app/share/appdata/io.gpt4all.gpt4all.appdata.xml"
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/nomic-ai/gpt4all.git",
      "tag": "v3.10.0",
      "commit": "228d5379cfb54e966449e153082c74c66b27c6c9",
      "x-checker-data": {
       "type": "git",
       "tag-pattern": "^v([\\d.]+)$"
      }
     },
     {
      "type": "file",
      "url": "https://gpt4all.io/models/gguf/nomic-embed-text-v1.5.f16.gguf",
      "sha256": "f7af6f66802f4df86eda10fe9bbcfc75c39562bed48ef6ace719a251cf1c2fdb",
      "dest": "gpt4all-chat/resources/"
     },
     {
      "type": "patch",
      "path": "patches/0001-embedding-model-path.patch"
     },
     {
      "type": "patch",
      "path": "patches/0002-appdata-version.patch"
     }
    ]
   }
  ]
 }
}