Loading nixos/modules/services/audio/music-assistant.nix +4 −0 Original line number Diff line number Diff line Loading @@ -95,6 +95,10 @@ in [ lsof ] ++ lib.optionals (lib.elem "airplay" cfg.providers) [ cliairplay libraop ] ++ lib.optionals (lib.elem "airplay_receiver" cfg.providers) [ shairport-sync ] Loading pkgs/by-name/mu/music-assistant/cliraop-cliap2.patch 0 → 100644 +29 −0 Original line number Diff line number Diff line diff --git a/music_assistant/providers/airplay/helpers.py b/music_assistant/providers/airplay/helpers.py index c5fef7eb..a628622d 100644 --- a/music_assistant/providers/airplay/helpers.py +++ b/music_assistant/providers/airplay/helpers.py @@ -6,6 +6,7 @@ import os import platform import time +from shutil import which from typing import TYPE_CHECKING from zeroconf import IPVersion @@ -176,7 +177,6 @@ async def check_binary(cli_path: str) -> str | None: pass return None - base_path = os.path.join(os.path.dirname(__file__), "bin") system = platform.system().lower().replace("darwin", "macos") architecture = platform.machine().lower() @@ -188,7 +188,7 @@ async def check_binary(cli_path: str) -> str | None: raise RuntimeError(f"Unsupported streaming protocol requested: {protocol}") if bridge_binary := await check_binary( - os.path.join(base_path, f"{package}-{system}-{architecture}") + which(package) ): return bridge_binary pkgs/by-name/mu/music-assistant/package.nix +4 −10 Original line number Diff line number Diff line Loading @@ -40,11 +40,6 @@ let pythonPath = python.pkgs.makePythonPath providerDependencies; in assert (lib.elem "airplay" providers) -> throw "music-assistant: airplay support is missing libraop, a library we will not package because it depends on OpenSSL 1.1."; python.pkgs.buildPythonApplication rec { pname = "music-assistant"; version = "2.7.8"; Loading @@ -69,6 +64,9 @@ python.pkgs.buildPythonApplication rec { # Look up shairport-sync from PATH at runtime ./shairport-sync.patch # Look up cliraop/cliap2 from PATH at runtime ./cliraop-cliap2.patch # Disable interactive dependency resolution, which clashes with the immutable Python environment ./dont-install-deps.patch Loading @@ -95,6 +93,7 @@ python.pkgs.buildPythonApplication rec { --replace-fail "get-mac" "getmac" rm -rv \ music_assistant/providers/airplay/bin/{cliap2-*,cliraop-*} \ music_assistant/providers/airplay_receiver/bin/{build_binaries.sh,shairport-sync-*} \ music_assistant/providers/spotify/bin ''; Loading Loading @@ -196,11 +195,6 @@ python.pkgs.buildPythonApplication rec { pythonImportsCheck = [ "music_assistant" ]; postFixup = '' # binary native code, segfaults when autopatchelf'd, requires openssl 1.1 to build rm $out/${python3.sitePackages}/music_assistant/providers/airplay/bin/cliraop-* ''; passthru = { inherit python Loading Loading
nixos/modules/services/audio/music-assistant.nix +4 −0 Original line number Diff line number Diff line Loading @@ -95,6 +95,10 @@ in [ lsof ] ++ lib.optionals (lib.elem "airplay" cfg.providers) [ cliairplay libraop ] ++ lib.optionals (lib.elem "airplay_receiver" cfg.providers) [ shairport-sync ] Loading
pkgs/by-name/mu/music-assistant/cliraop-cliap2.patch 0 → 100644 +29 −0 Original line number Diff line number Diff line diff --git a/music_assistant/providers/airplay/helpers.py b/music_assistant/providers/airplay/helpers.py index c5fef7eb..a628622d 100644 --- a/music_assistant/providers/airplay/helpers.py +++ b/music_assistant/providers/airplay/helpers.py @@ -6,6 +6,7 @@ import os import platform import time +from shutil import which from typing import TYPE_CHECKING from zeroconf import IPVersion @@ -176,7 +177,6 @@ async def check_binary(cli_path: str) -> str | None: pass return None - base_path = os.path.join(os.path.dirname(__file__), "bin") system = platform.system().lower().replace("darwin", "macos") architecture = platform.machine().lower() @@ -188,7 +188,7 @@ async def check_binary(cli_path: str) -> str | None: raise RuntimeError(f"Unsupported streaming protocol requested: {protocol}") if bridge_binary := await check_binary( - os.path.join(base_path, f"{package}-{system}-{architecture}") + which(package) ): return bridge_binary
pkgs/by-name/mu/music-assistant/package.nix +4 −10 Original line number Diff line number Diff line Loading @@ -40,11 +40,6 @@ let pythonPath = python.pkgs.makePythonPath providerDependencies; in assert (lib.elem "airplay" providers) -> throw "music-assistant: airplay support is missing libraop, a library we will not package because it depends on OpenSSL 1.1."; python.pkgs.buildPythonApplication rec { pname = "music-assistant"; version = "2.7.8"; Loading @@ -69,6 +64,9 @@ python.pkgs.buildPythonApplication rec { # Look up shairport-sync from PATH at runtime ./shairport-sync.patch # Look up cliraop/cliap2 from PATH at runtime ./cliraop-cliap2.patch # Disable interactive dependency resolution, which clashes with the immutable Python environment ./dont-install-deps.patch Loading @@ -95,6 +93,7 @@ python.pkgs.buildPythonApplication rec { --replace-fail "get-mac" "getmac" rm -rv \ music_assistant/providers/airplay/bin/{cliap2-*,cliraop-*} \ music_assistant/providers/airplay_receiver/bin/{build_binaries.sh,shairport-sync-*} \ music_assistant/providers/spotify/bin ''; Loading Loading @@ -196,11 +195,6 @@ python.pkgs.buildPythonApplication rec { pythonImportsCheck = [ "music_assistant" ]; postFixup = '' # binary native code, segfaults when autopatchelf'd, requires openssl 1.1 to build rm $out/${python3.sitePackages}/music_assistant/providers/airplay/bin/cliraop-* ''; passthru = { inherit python Loading