app-id: com.github.jameswestwood.Playchitect runtime: org.gnome.Platform runtime-version: '49' sdk: org.gnome.Sdk command: playchitect-gui finish-args: # Wayland and X11 (fallback) display access - --share=ipc - --socket=wayland - --socket=fallback-x11 # GPU acceleration (for smooth rendering) - --device=dri # Music library access (read-only) and playlist output (read-write) - --filesystem=xdg-music:ro - --filesystem=xdg-documents # Allow opening arbitrary audio files passed on the command line via %F # (e.g. from Files / Nautilus "Open with Playchitect"). Read-only access to # the full home tree is the standard approach for music players (Lollypop, # Rhythmbox) because users may keep audio files outside ~/Music. - --filesystem=home:ro # Desktop portals (file chooser, etc.) - --talk-name=org.freedesktop.portal.Desktop - --talk-name=org.freedesktop.portal.FileChooser modules: # ── Python runtime dependencies ───────────────────────────────────────────── # NOTE: This module uses network access during the build, which is acceptable # for self-hosted distribution. For a Flathub submission the pip install # commands must be replaced with pre-generated source entries produced by # flatpak-pip-generator (see scripts/generate_flatpak_sources.py). - name: python-deps buildsystem: simple build-options: # Self-hosted builds may use the network; Flathub sandboxes do not. # Remove this line and switch to pre-generated sources before submitting # to Flathub. env: PIP_DISABLE_PIP_VERSION_CHECK: "1" build-commands: # Install wheels into the Flatpak prefix - pip3 install --prefix=/app --no-build-isolation librosa>=0.10.0 mutagen>=1.47.0 scikit-learn>=1.3.0 numpy>=1.24.0 scipy>=1.11.0 click>=8.1.0 pyyaml>=6.0 sources: # Dummy source — pip downloads happen at build time. # See note above re: Flathub. - type: shell commands: - echo "Downloading Python dependencies via pip..." # ── Playchitect application ────────────────────────────────────────────────── - name: playchitect buildsystem: simple build-commands: # Install the app itself (no network needed — source is local) - pip3 install --prefix=/app --no-build-isolation --no-deps . # Install freedesktop integration files - install -Dm644 data/playchitect.desktop /app/share/applications/playchitect.desktop - install -Dm644 data/com.github.jameswestwood.Playchitect.appdata.xml /app/share/metainfo/com.github.jameswestwood.Playchitect.appdata.xml # Icons — install all available sizes - for size in 16 22 24 32 48 64 128 256 512; do install -Dm644 data/icons/hicolor/${size}x${size}/apps/com.github.jameswestwood.Playchitect.png /app/share/icons/hicolor/${size}x${size}/apps/com.github.jameswestwood.Playchitect.png; done sources: - type: dir # Path is relative to the manifest file location # (packaging/flatpak/ → ../../ is the repo root) path: ../..