# QBZ Snap package configuration # NOTE: Keep this file in sync with packaging/snap/snapcraft.yaml. name: qbz-player title: "QBZ — Native Qobuz Client for Linux" version: '1.1.8' summary: Native Qobuz player for Linux with bit-perfect audio and DAC control description: | QBZ is a native Linux desktop client for Qobuz™, designed for high-fidelity playback. Unlike browser-based players or web wrappers, QBZ uses a native audio pipeline with direct ALSA and PipeWire integration, allowing bit-perfect playback, exclusive device access, and proper per-track sample-rate switching for external DACs. Browsers are limited by system mixers and WebAudio, often resampling audio to 48 kHz. QBZ bypasses these limitations to deliver true high-resolution audio up to 24-bit / 192 kHz on Linux. Features: - Native Qobuz™ streaming client (not a web wrapper) - Bit-perfect playback with ALSA exclusive mode - DAC passthrough and per-track sample-rate switching - Hi-Res FLAC playback - Queue, playlists, favorites, and offline cache - Local library integration - Chromecast and DLNA support - MPRIS media keys and desktop integration - Open source (MIT license) QBZ is built for Linux users and audiophiles who care about how audio actually reaches their hardware. Legal: QBZ uses the Qobuz™ API but is not affiliated with, endorsed by, or certified by Qobuz. license: MIT contact: https://github.com/vicrodh/qbz/discussions website: https://qbz.lol source-code: https://github.com/vicrodh/qbz issues: https://github.com/vicrodh/qbz/issues grade: stable confinement: strict base: core22 icon: packaging/snap/snap/gui/qbz.png passthrough: layout: /usr/lib/x86_64-linux-gnu/webkit2gtk-4.1: bind: $SNAP/usr/lib/x86_64-linux-gnu/webkit2gtk-4.1 /usr/share/alsa: bind: $SNAP/usr/share/alsa /etc/alsa: bind: $SNAP/etc/alsa /usr/lib/x86_64-linux-gnu/alsa-lib: bind: $SNAP/usr/lib/x86_64-linux-gnu/alsa-lib architectures: - build-on: amd64 - build-on: arm64 apps: qbz: command: bin/qbz desktop: packaging/snap/snap/gui/qbz.desktop extensions: [gnome] environment: # Prefer GNOME platform GL libs to avoid Mesa/driver mismatches on NVIDIA. LD_LIBRARY_PATH: $SNAP/gnome-platform/usr/lib/x86_64-linux-gnu:$SNAP/gnome-platform/lib/x86_64-linux-gnu:$SNAP/gnome-platform/usr/lib/aarch64-linux-gnu:$SNAP/gnome-platform/lib/aarch64-linux-gnu:$SNAP/gnome-platform/usr/lib:$SNAP/gnome-platform/lib:$LD_LIBRARY_PATH WEBKIT_EXEC_PATH: $SNAP/usr/lib/x86_64-linux-gnu/webkit2gtk-4.1 GTK_USE_PORTAL: "0" GIO_USE_PORTAL: "0" PIPEWIRE_RUNTIME_DIR: $XDG_RUNTIME_DIR/.. plugs: - network - network-status - audio-playback - home - removable-media - desktop - desktop-legacy - wayland - x11 - unity7 - gsettings - pulseaudio - alsa - pipewire parts: qbz: plugin: rust source: https://github.com/vicrodh/qbz.git source-tag: v1.1.8 build-environment: - PKG_CONFIG_PATH: /snap/gnome-42-2204-sdk/current/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/pkgconfig:/snap/gnome-42-2204-sdk/current/usr/share/pkgconfig - LIBRARY_PATH: /snap/gnome-42-2204-sdk/current/usr/lib/$SNAPCRAFT_ARCH_TRIPLET - LD_LIBRARY_PATH: /snap/gnome-42-2204-sdk/current/usr/lib/$SNAPCRAFT_ARCH_TRIPLET - RUSTFLAGS: -C link-arg=-Wl,-rpath-link,/snap/gnome-42-2204-sdk/current/usr/lib/$SNAPCRAFT_ARCH_TRIPLET -C link-arg=-Wl,-rpath-link,/snap/gnome-42-2204-sdk/current/usr/lib - LDFLAGS: -Wl,-rpath-link,/snap/gnome-42-2204-sdk/current/usr/lib/$SNAPCRAFT_ARCH_TRIPLET -Wl,-rpath-link,/snap/gnome-42-2204-sdk/current/usr/lib build-packages: - libwebkit2gtk-4.1-dev - libgtk-3-dev - libayatana-appindicator3-dev - librsvg2-dev - patchelf - libssl-dev - libasound2-dev - pkg-config # alsa-utils for aplay command (device enumeration) - alsa-utils stage-packages: - libwebkit2gtk-4.1-0 - libgtk-3-0 - libayatana-appindicator3-1 - libasound2 - libasound2-data - libasound2-plugins - libssl3 - pipewire-bin - pulseaudio-utils # Include alsa-utils in the snap for aplay -L command - alsa-utils override-build: | # Allow sandboxed builds to override GTK_USE_PORTAL. perl -0pi -e 'if ($_ !~ /var_os\\(\"GTK_USE_PORTAL\"\\)/) { s/std::env::set_var\\(\"GTK_USE_PORTAL\", \"1\"\\);/if std::env::var_os\\(\"GTK_USE_PORTAL\"\\).is_none() {\\n std::env::set_var(\"GTK_USE_PORTAL\", \"1\");\\n }/ }' src-tauri/src/main.rs # Install Node.js for frontend build curl -fsSL https://deb.nodesource.com/setup_20.x | bash - apt-get install -y nodejs # Build frontend npm ci npm run tauri build -- --no-bundle # Install binary mkdir -p $SNAPCRAFT_PART_INSTALL/bin cp src-tauri/target/release/qbz-nix $SNAPCRAFT_PART_INSTALL/bin/qbz override-prime: | snapcraftctl prime if [ -d "$SNAPCRAFT_PRIME/usr/lib/aarch64-linux-gnu" ] && [ ! -e "$SNAPCRAFT_PRIME/usr/lib/x86_64-linux-gnu" ]; then ln -s aarch64-linux-gnu "$SNAPCRAFT_PRIME/usr/lib/x86_64-linux-gnu" fi