app-id: com.roundabout_host.Izvor
runtime: org.freedesktop.Platform
runtime-version: "24.08"
sdk: org.freedesktop.Sdk
command: izvor
finish-args:
  - --share=network
  - --filesystem=home
  - --filesystem=host
  - --socket=x11
  - --socket=wayland
  - --filesystem=xdg-config/fontconfig:ro
  - --filesystem=xdg-data/izvor:create
  - --filesystem=xdg-config/izvor:create
  - --talk-name=org.freedesktop.DBus
  - --own-name=org.freedesktop.DBus
  - --socket=session-bus
  - --filesystem=~/.local/share/fonts:ro
  - --filesystem=~/.fonts:ro
  - --filesystem=xdg-data/fonts:ro
environment:
  PYTHONPATH: "/app/lib/python3.12/site-packages:${PYTHONPATH}"
modules:
  - name: python-requirements
    buildsystem: simple
    build-commands:
      - mkdir -p /app/share/python_packages
      - cp -r . /app/share/python_packages/
    sources:
      - type: dir
        path: python_packages
  - name: izvor
    buildsystem: simple
    build-commands:
      - unset GTK_MODULES
      - mkdir -p /app/bin /app/share/izvor
      - cp -r ./* /app/share/izvor/
      - ls /app/share/python_packages
      - pip install --no-index --find-links=/app/share/python_packages -r /app/share/izvor/requirements-flatpak.txt --target=/app/lib/python3.12/site-packages
      - chmod +x /app/share/izvor/__init__.py
      - ln -s /app/share/izvor/__init__.py /app/bin/izvor
      #- fc-cache -fv
    sources:
      - type: dir
        path: src
  - name: izvor_utils
    buildsystem: simple
    build-commands:
      - mkdir -p /app/lib/python3.12/site-packages/izvor_utils
      - cp -r . /app/lib/python3.12/site-packages/izvor_utils/
    sources:
      - type: dir
        path: izvor_utils
