{
 "app_id": "io.github.labbots.NiimPrintX",
 "source_url": "https://raw.githubusercontent.com/flathub/io.github.labbots.NiimPrintX/master/io.github.labbots.NiimPrintX.yml",
 "runtime": "org.freedesktop.Platform",
 "runtime_version": "25.08",
 "sdk": "org.freedesktop.Sdk",
 "finish_args": [
  "--share=ipc",
  "--share=network",
  "--socket=x11",
  "--filesystem=host",
  "--system-talk-name=org.bluez"
 ],
 "module_count": 10,
 "fetched_at": "2026-09-20T15:24:50.692745+00:00",
 "manifest": {
  "app-id": "io.github.labbots.NiimPrintX",
  "runtime": "org.freedesktop.Platform",
  "runtime-version": "25.08",
  "sdk": "org.freedesktop.Sdk",
  "sdk-extensions": [
   "org.freedesktop.Sdk.Extension.rust-stable"
  ],
  "command": "niimprintx",
  "finish-args": [
   "--share=ipc",
   "--socket=x11",
   "--share=network",
   "--system-talk-name=org.bluez",
   "--filesystem=host"
  ],
  "build-options": {
   "append-path": "/usr/lib/sdk/rust-stable/bin"
  },
  "modules": [
   {
    "name": "imagemagick",
    "config-opts": [
     "--enable-shared",
     "--disable-static",
     "--disable-docs",
     "--with-modules",
     "--with-threads"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/ImageMagick/ImageMagick/archive/7.1.2-30.tar.gz",
      "sha256": "3034a64f22398e15ee3dd1e6b1aa83d838cfc47df1bb246ae0eca9590e6ace72",
      "x-checker-data": {
       "type": "anitya",
       "project-id": 1372,
       "stable-only": true,
       "url-template": "https://github.com/ImageMagick/ImageMagick/archive/$version.tar.gz"
      }
     }
    ],
    "cleanup": [
     "/bin/*-config"
    ]
   },
   "pre-pypi-dependencies.json",
   "rust-pypi-dependencies.json",
   "python3-poetry.json",
   "pyinstaller.json",
   "python3-requirements.yaml",
   {
    "name": "python3-meson-python",
    "buildsystem": "simple",
    "build-commands": [
     "pip3 install --verbose --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"meson-python\" --no-build-isolation"
    ],
    "cleanup": [
     "*"
    ],
    "sources": [
     {
      "type": "file",
      "url": "https://files.pythonhosted.org/packages/16/7f/d1b0c65b267a1463d752b324f11d3470e30889daefc4b9ec83029bfa30b5/meson_python-0.19.0-py3-none-any.whl",
      "sha256": "67b5906c37404396d23c195e12c8825506074460d4a2e7083266b845d14f0298"
     },
     {
      "type": "file",
      "url": "https://files.pythonhosted.org/packages/1d/0b/da4851b1e2d9c40c9bd74c0abd94510a7d797da9ccde0a90e8953751ed4a/pyproject_metadata-0.11.0-py3-none-any.whl",
      "sha256": "85bbecca8694e2c00f63b492c96921d6c228454057c88e7c352b2077fcaa4096"
     }
    ]
   },
   {
    "name": "python3-pycairo",
    "buildsystem": "simple",
    "build-commands": [
     "pip3 install --verbose --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"pycairo\" --no-build-isolation"
    ],
    "sources": [
     {
      "type": "file",
      "url": "https://files.pythonhosted.org/packages/22/d9/1728840a22a4ef8a8f479b9156aa2943cd98c3907accd3849fb0d5f82bfd/pycairo-1.29.0.tar.gz",
      "sha256": "f3f7fde97325cae80224c09f12564ef58d0d0f655da0e3b040f5807bd5bd3142"
     }
    ]
   },
   "python3-tkinter.yaml",
   {
    "name": "NiimPrintX",
    "buildsystem": "simple",
    "build-commands": [
     "cp -r NiimPrintX/ /app/lib/python3.13/site-packages/",
     "install -Dm755 assets/linux/niimprintx /app/bin/niimprintx",
     "install -Dm755 niimprintx-cli /app/bin/niimprintx-cli",
     "install -Dm755 bluetoothctl /app/bin/bluetoothctl",
     "install -Dm644 -t /app/share/applications/ assets/linux/${FLATPAK_ID}.desktop",
     "install -Dm644 assets/linux/${FLATPAK_ID}.metainfo.xml /app/share/metainfo/${FLATPAK_ID}.metainfo.xml",
     "install -Dm644 assets/linux/${FLATPAK_ID}.mime.xml /app/share/mime/packages/${FLATPAK_ID}.mime.xml",
     "for i in {128,256,512} ; do\n  install -Dm644 ./NiimPrintX/ui/assets/icon.iconset/icon_${i}x${i}.png /app/share/icons/hicolor/${i}x${i}/apps/${FLATPAK_ID}.png ;\ndone;\n"
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/labbots/NiimPrintX",
      "tag": "v0.0.47",
      "commit": "e51cf57b19fda8de66632ab063784df1c359fd5f"
     },
     {
      "type": "patch",
      "path": "add-b1-support.patch",
      "use-git-am": true
     },
     {
      "type": "patch",
      "path": "0001-Look-for-assets-in-the-right-place.patch",
      "use-git-am": true
     },
     {
      "type": "patch",
      "path": "0001-Use-magick-on-Linux-as-well.patch",
      "use-git-am": true
     },
     {
      "type": "patch",
      "path": "0001-Add-desktop-and-metainfo-file-for-Linux-distribution.patch",
      "use-git-am": true
     },
     {
      "type": "script",
      "dest-filename": "niimprintx-cli",
      "commands": [
       "python -m NiimPrintX.cli"
      ]
     },
     {
      "type": "script",
      "dest-filename": "bluetoothctl",
      "commands": [
       {
        "echo \"bluetoothctl": "5.99\""
       }
      ]
     }
    ]
   }
  ]
 }
}