app-id: org.jacktrip.JackTrip.Devel
runtime: org.kde.Platform
runtime-version: '5.15'
sdk: org.kde.Sdk
command: jacktrip
finish-args:
  # X11 + XShm access
  - --share=ipc
  - --socket=x11
  # Wayland access (disabled because of missing window shadows)
  # - --socket=wayland
  # Needs network access
  - --share=network
  # Pipewire/Jack
  - --filesystem=xdg-run/pipewire-0
  # For setting realtime priority for network thread?
  - --socket=system-bus
cleanup:
  - /lib/python3.8
  - /share/man
modules:
  - shared-modules/linux-audio/jack2.json
  - name: python3-pyyaml
    buildsystem: simple
    cleanup: [ "*" ]
    build-commands:
    - pip3 install --verbose --exists-action=i --no-index --find-links="file://${PWD}" --prefix=${FLATPAK_DEST} "pyyaml" --no-build-isolation
    sources:
    - type: file
      sha256: 68fb519c14306fec9720a2a5b45bc9f0c8d1b9c72adf45c37baedfcd949c35a2
      url: https://files.pythonhosted.org/packages/36/2b/61d51a2c4f25ef062ae3f74576b01638bebad5e045f747ff12643df63844/PyYAML-6.0.tar.gz
  - name: python3-jinja2
    buildsystem: simple
    cleanup: [ "*" ]
    build-commands:
    - pip3 install --verbose --exists-action=i --no-index --find-links="file://${PWD}" --prefix=${FLATPAK_DEST} "jinja2" --no-build-isolation
    sources:
    - sha256: 594c67807fb16238b30c44bdf74f36c02cdf22d1c8cda91ef8a0ed8dabf5620a
      type: file
      url: https://files.pythonhosted.org/packages/bf/10/ff66fea6d1788c458663a84d88787bae15d45daa16f6b3ef33322a51fc7e/MarkupSafe-2.0.1.tar.gz
    - sha256: 077ce6014f7b40d03b47d1f1ca4b0fc8328a692bd284016f806ed0eaca390ad8
      type: file
      url: https://files.pythonhosted.org/packages/20/9a/e5d9ec41927401e41aea8af6d16e78b5e612bca4699d417f646a9610a076/Jinja2-3.0.3-py3-none-any.whl
  - name: jacktrip
    buildsystem: meson
    config-opts:
      - -Dprofile=development
    sources:
      - type: git
        url: {{ env['REPO'] }}
        branch: {{ env['REF'] }}
