{
 "app_id": "org.kicad.KiCad",
 "source_url": "https://raw.githubusercontent.com/flathub/org.kicad.KiCad/master/org.kicad.KiCad.yml",
 "runtime": "org.gnome.Sdk",
 "runtime_version": "50",
 "sdk": "org.gnome.Sdk",
 "finish_args": [
  "--share=ipc",
  "--share=network",
  "--socket=x11",
  "--device=dri",
  "--filesystem=home",
  "--filesystem=/media",
  "--filesystem=/run/media"
 ],
 "module_count": 21,
 "fetched_at": "2026-09-17T16:15:54.470403+00:00",
 "manifest": {
  "app-id": "org.kicad.KiCad",
  "runtime": "org.gnome.Sdk",
  "runtime-version": "50",
  "sdk": "org.gnome.Sdk",
  "command": "kicad-startup",
  "finish-args": [
   "--device=dri",
   "--filesystem=home",
   "--filesystem=/media",
   "--filesystem=/run/media",
   "--share=ipc",
   "--share=network",
   "--socket=x11",
   "--env=TMPDIR=/var/tmp"
  ],
  "add-extensions": {
   "org.kicad.KiCad.Library": {
    "version": "stable",
    "directory": "extensions/Library",
    "autodelete": true,
    "no-autodownload": false,
    "subdirectories": true,
    "merge-dirs": "template;symbols;footprints;3dmodels"
   },
   "org.kicad.KiCad.ODBCDriver": {
    "version": "stable",
    "directory": "extensions/ODBCDriver",
    "autodelete": true,
    "no-autodownload": true,
    "subdirectories": true,
    "add-ld-path": "lib",
    "merge-dirs": "lib;template"
   }
  },
  "cleanup": [
   "/lib/cmake",
   "/lib/pkgconfig",
   "/lib/wx",
   "/lib64",
   "/share/aclocal",
   "/share/bakefile",
   "*.la",
   "*.a"
  ],
  "modules": [
   "shared-modules/glu/glu-9.json",
   "shared-modules/glew/glew.json",
   {
    "name": "glm",
    "buildsystem": "simple",
    "build-commands": [
     "cp -r glm /app/include"
    ],
    "cleanup": [
     "/include"
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/g-truc/glm",
      "tag": "1.0.3",
      "commit": "8d1fd52e5ab5590e2c81768ace50c72bae28f2ed",
      "x-checker-data": {
       "type": "git",
       "tag-pattern": "^([\\d\\.]+)$"
      }
     }
    ]
   },
   {
    "name": "libXmu",
    "cleanup": [
     "/include",
     "/share/doc"
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://gitlab.freedesktop.org/xorg/lib/libxmu.git",
      "tag": "libXmu-1.3.1",
      "commit": "cdf280f6611932f79ab872832974e8043b1cad6d",
      "x-checker-data": {
       "type": "git",
       "tag-pattern": "^libXmu-([\\d\\.]+)$"
      }
     }
    ]
   },
   {
    "name": "rapidjson",
    "buildsystem": "cmake-ninja",
    "config-opts": [
     "-DCMAKE_BUILD_TYPE=RelWithDebInfo",
     "-DRAPIDJSON_BUILD_DOC=OFF",
     "-DRAPIDJSON_BUILD_EXAMPLES=OFF",
     "-DRAPIDJSON_BUILD_TESTS=OFF"
    ],
    "cleanup": [
     "/include",
     "/lib/cmake",
     "/lib/pkgconfig",
     "/share"
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/Tencent/rapidjson.git",
      "commit": "24b5e7a8b27f42fa16b96fc70aade9106cf7102f"
     }
    ]
   },
   {
    "name": "OCCT",
    "buildsystem": "cmake-ninja",
    "cleanup": [
     "/bin",
     "/include",
     "/share/doc"
    ],
    "config-opts": [
     "-DCMAKE_BUILD_TYPE=RelWithDebInfo",
     "-DBUILD_LIBRARY_TYPE=Shared",
     "-DBUILD_DOC_Overview=OFF",
     "-DBUILD_MODULE_ApplicationFramework=ON",
     "-DBUILD_MODULE_DataExchange=ON",
     "-DBUILD_MODULE_Draw=OFF",
     "-DBUILD_MODULE_FoundationClasses=ON",
     "-DBUILD_MODULE_ModelingAlgorithms=ON",
     "-DBUILD_MODULE_ModelingData=ON",
     "-DBUILD_MODULE_Visualization=ON",
     "-DUSE_VTK=OFF",
     "-DUSE_TBB=OFF",
     "-DUSE_RAPIDJSON=ON",
     "-DINSTALL_FREETYPE=OFF",
     "-DINSTALL_TEST_CASES=OFF"
    ],
    "sources": [
     {
      "type": "git",
      "commit": "b8f597c677811d1f9f4d8a97f5ae2825c0353a42",
      "url": "https://github.com/Open-Cascade-SAS/OCCT",
      "tag": "V8_0_1",
      "x-checker-data": {
       "type": "git",
       "tag-pattern": "^V([\\d_]+)$"
      }
     }
    ]
   },
   {
    "name": "boost",
    "buildsystem": "simple",
    "build-commands": [
     "./bootstrap.sh --prefix=/app --with-libraries=locale,test",
     "./b2 -j $FLATPAK_BUILDER_N_JOBS install"
    ],
    "cleanup": [
     "/include"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://archives.boost.io/release/1.92.0/source/boost_1_92_0.tar.gz",
      "sha256": "c4a3b310ddd2472416e091067166b0713be97c63f38c212c484ada022fd296ce",
      "x-checker-data": {
       "type": "html",
       "url": "https://www.boost.org/feed/downloads.rss",
       "url-template": "https://archives.boost.io/release/$version/source/boost_${version0}_${version1}_${version2}.tar.gz",
       "version-pattern": "<title>Version (\\d+\\.?\\d+\\.\\d+)(?!\\sbeta)|</title>$"
      }
     }
    ]
   },
   {
    "name": "wxWidgets",
    "cleanup": [
     "/bin",
     "/include"
    ],
    "config-opts": [
     "--with-opengl"
    ],
    "sources": [
     {
      "type": "git",
      "commit": "565553ee980e925bbd8b3cdaeea0eb9f453d7dfd",
      "tag": "v3.3.3.1",
      "url": "https://github.com/wxWidgets/wxWidgets",
      "x-checker-data": {
       "is-important": true,
       "type": "git",
       "tag-pattern": "^v([\\d\\.]+)$"
      }
     }
    ]
   },
   "python3-requests.yml",
   "python3-wxPython.yml",
   {
    "name": "swig",
    "buildsystem": "autotools",
    "cleanup": [
     "/bin",
     "/share"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://sourceforge.net/projects/swig/files/swig/swig-4.4.1/swig-4.4.1.tar.gz",
      "sha256": "40162a706c56f7592d08fd52ef5511cb7ac191f3593cf07306a0a554c6281fcf",
      "x-checker-data": {
       "type": "html",
       "url": "https://www.swig.org/download.html",
       "version-pattern": "The latest release is <a href=\".+\">swig-([\\d\\.]+)</a>",
       "url-template": "https://sourceforge.net/projects/swig/files/swig/swig-$version/swig-$version.tar.gz",
       "versions": {
        "<": "4.5.0"
       }
      }
     }
    ]
   },
   {
    "name": "ngspice",
    "cleanup": [
     "/bin",
     "/include",
     "/share/man"
    ],
    "config-opts": [
     "--disable-silent-rules",
     "--enable-xspice",
     "--enable-cider",
     "--enable-openmp",
     "--with-ngshared"
    ],
    "rm-configure": true,
    "sources": [
     {
      "type": "archive",
      "url": "https://downloads.sourceforge.net/project/ngspice/ng-spice-rework/47/ngspice-47.tar.gz",
      "sha256": "894e649651f1838a14095e5a5439e7d3aa63e87ede14d283173fda4fcdef675f",
      "x-checker-data": {
       "is-important": true,
       "type": "html",
       "url": "https://ngspice.sourceforge.io/download.html",
       "url-template": "https://downloads.sourceforge.net/project/ngspice/ng-spice-rework/$version/ngspice-$version.tar.gz",
       "version-pattern": "<strong>ngspice-([\\d.]+)</strong>"
      }
     }
    ]
   },
   {
    "name": "unixodbc",
    "cleanup": [
     "/share/man"
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/lurcher/unixODBC.git",
      "tag": "2.3.12",
      "commit": "c335dbf3fa25b524e935e98cf26b96a2e13f5c81",
      "x-checker-data": {
       "type": "git",
       "tag-pattern": "^([\\d\\.]+)$"
      }
     },
     {
      "type": "script",
      "commands": [
       "autoreconf -fi"
      ]
     }
    ]
   },
   {
    "name": "libgit2",
    "buildsystem": "cmake-ninja",
    "cleanup": [
     "/bin",
     "/include",
     "/lib/pkgconfig"
    ],
    "config-opts": [
     "-DCMAKE_BUILD_TYPE=RelWithDebInfo"
    ],
    "sources": [
     {
      "type": "git",
      "commit": "49e408b3208bc3093757a1c2db938d3590f3f412",
      "tag": "v1.9.7",
      "url": "https://github.com/libgit2/libgit2",
      "x-checker-data": {
       "type": "git",
       "tag-pattern": "^(v[\\d\\.]+)$"
      }
     }
    ]
   },
   {
    "name": "protobuf",
    "buildsystem": "cmake-ninja",
    "config-opts": [
     "-Dprotobuf_BUILD_SHARED_LIBS=ON",
     "-Dprotobuf_BUILD_TESTS=OFF",
     "-Dprotobuf_ALLOW_CCACHE=ON",
     "-Dprotobuf_LOCAL_DEPENDENCIES_ONLY=ON"
    ],
    "cleanup": [
     "/bin",
     "/include"
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/protocolbuffers/protobuf.git",
      "tag": "v36.0",
      "commit": "3f17acbf7ffbda81db8be17505554c726e558bb2",
      "x-checker-data": {
       "type": "git",
       "tag-pattern": "^v([\\d\\.]+)$"
      }
     }
    ]
   },
   {
    "name": "nng",
    "buildsystem": "cmake-ninja",
    "config-opts": [
     "-DCMAKE_BUILD_TYPE=RelWithDebInfo",
     "-DBUILD_SHARED_LIBS=ON"
    ],
    "cleanup": [
     "/bin",
     "/include"
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/nanomsg/nng.git",
      "tag": "v1.12.3",
      "commit": "73f715235967afc783e0b99c52d015dc10897fda",
      "x-checker-data": {
       "type": "git",
       "tag-pattern": "^v([\\d\\.]+)$"
      }
     }
    ]
   },
   {
    "name": "libspacenav",
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/FreeSpacenav/libspnav",
      "tag": "v1.2",
      "commit": "d641e5cbbe0d6d2381a2ee8d95c8c7273d005272",
      "x-checker-data": {
       "type": "git",
       "tag-pattern": "^v([\\d\\.]+)$"
      }
     }
    ]
   },
   {
    "name": "poppler",
    "buildsystem": "cmake-ninja",
    "config-opts": [
     "-DCMAKE_BUILD_TYPE=RelWithDebInfo",
     "-DENABLE_QT5=OFF",
     "-DENABLE_QT6=OFF"
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://gitlab.freedesktop.org/poppler/poppler.git",
      "commit": "d663f8fe0237073fadf43e4e19acc46b3ba3e80a",
      "tag": "poppler-26.08.0",
      "x-checker-data": {
       "type": "git",
       "tag-pattern": "^poppler-([\\d\\.]+)$"
      }
     }
    ]
   },
   "python3-pytest.yml",
   {
    "name": "kicad",
    "builddir": true,
    "buildsystem": "cmake-ninja",
    "config-opts": [
     "-DCMAKE_BUILD_TYPE=RelWithDebInfo",
     "-DCMAKE_CTEST_ARGUMENTS=\"--output-on-failure\"",
     "-DOCC_INCLUDE_DIR=/app/include/opencascade",
     "-DOPENGL_glu_LIBRARY=/app/lib/libGLU.so",
     "-DKICAD_BUILD_FLATPAK=ON",
     "-DKICAD_BUILD_I18N=ON",
     "-DKICAD_LIBRARY_DATA=/app/extensions/Library",
     "-DKICAD_USE_PCH=OFF"
    ],
    "post-install": [
     "install ../../flatpak-extra/kicad-startup /app/bin/kicad-startup",
     "install ../../flatpak-extra/eeschema-startup /app/bin/eeschema-startup",
     "install ../../flatpak-extra/pcbnew-startup /app/bin/pcbnew-startup",
     "install ../../flatpak-extra/python /app/bin/python",
     "install ../../flatpak-extra/pip3 /app/bin/pip3.10",
     "ln -s /app/bin/pip3.10 /app/bin/pip3",
     "ln -s /app/bin/pip3 /app/bin/pip",
     "install -d /app/extensions/ODBCDriver",
     "for f in $FLATPAK_DEST/share/applications/*.desktop; do\n  desktop_name=\"$(basename $f)\";\n  if [ \"$desktop_name\" = \"org.kicad.KiCad.desktop\" ]; then\n    desktop-file-edit \\\n      --set-key=Exec \\\n      --set-value=\"kicad-startup %f\" \\\n      \"$f\";\n  else\n    if [[ \"$desktop_name\" =~ ^org\\.kicad\\.KiCad\\.(eeschema|pcbnew)\\.desktop$\n]]; then\n      desktop-file-edit \\\n        --set-key=Exec \\\n        --set-value=\"${BASH_REMATCH[1]}-startup %f\" \\\n        \"$f\";\n    fi;\n  fi;\ndone; unset desktop_name\n"
    ],
    "subdir": "kicad-git",
    "sources": [
     {
      "type": "git",
      "dest": "kicad-git",
      "url": "https://gitlab.com/kicad/code/kicad.git",
      "commit": "caf7377e9cb6fa1535ec3596dcb8c99bf44a996e",
      "tag": "10.0.6",
      "x-checker-data": {
       "is-main-source": true,
       "type": "git",
       "tag-pattern": "^([\\d\\.]+)$",
       "versions": {
        "<": "10.99.0"
       }
      }
     },
     {
      "type": "script",
      "dest": "flatpak-extra",
      "dest-filename": "pip3",
      "commands": [
       "export PYTHONUSERBASE=\"$XDG_DATA_HOME/python\"",
       "export PATH=\"$XDG_DATA_HOME/python/bin\":$PATH",
       "exec /usr/bin/pip3 \"$@\""
      ]
     },
     {
      "type": "script",
      "dest": "flatpak-extra",
      "dest-filename": "python",
      "commands": [
       "export PYTHONUSERBASE=\"$XDG_DATA_HOME/python\"",
       "export PATH=\"$XDG_DATA_HOME/python/bin\":$PATH",
       "exec /usr/bin/python \"$@\""
      ]
     },
     {
      "type": "script",
      "dest": "flatpak-extra",
      "dest-filename": "kicad-startup",
      "commands": [
       "mkdir -p ${XDG_CONFIG_HOME}/unixodbc",
       "export ODBCSYSINI=${XDG_CONFIG_HOME}/unixodbc",
       "rm -f ${ODBCSYSINI}/odbcinst.ini",
       "for template in /app/extensions/ODBCDriver/template/*.ini; do\n  test -f \"$template\" || continue;\n  odbcinst -i -d -f \"$template\" >/dev/null;\ndone\n",
       "exec /app/bin/kicad \"$@\""
      ]
     },
     {
      "type": "script",
      "dest": "flatpak-extra",
      "dest-filename": "eeschema-startup",
      "commands": [
       "mkdir -p ${XDG_CONFIG_HOME}/unixodbc",
       "export ODBCSYSINI=${XDG_CONFIG_HOME}/unixodbc",
       "rm -f ${ODBCSYSINI}/odbcinst.ini",
       "for template in /app/extensions/ODBCDriver/template/*.ini; do\n  test -f \"$template\" || continue;\n  odbcinst -i -d -f \"$template\" >/dev/null;\ndone\n",
       "exec /app/bin/eeschema \"$@\""
      ]
     },
     {
      "type": "script",
      "dest": "flatpak-extra",
      "dest-filename": "pcbnew-startup",
      "commands": [
       "mkdir -p ${XDG_CONFIG_HOME}/unixodbc",
       "export ODBCSYSINI=${XDG_CONFIG_HOME}/unixodbc",
       "rm -f ${ODBCSYSINI}/odbcinst.ini",
       "for template in /app/extensions/ODBCDriver/template/*.ini; do\n  test -f \"$template\" || continue;\n  odbcinst -i -d -f \"$template\" >/dev/null;\ndone\n",
       "exec /app/bin/pcbnew \"$@\""
      ]
     }
    ]
   },
   "kicad-doc.yml"
  ]
 }
}