diff --git a/pkgs/applications/audio/mopidy/mopidy.nix b/pkgs/applications/audio/mopidy/mopidy.nix index 6cb96daea52b..32e9e00d468f 100644 --- a/pkgs/applications/audio/mopidy/mopidy.nix +++ b/pkgs/applications/audio/mopidy/mopidy.nix @@ -24,30 +24,32 @@ pythonPackages.buildPythonApplication rec { nativeBuildInputs = [ wrapGAppsNoGuiHook ]; - buildInputs = with gst_all_1; [ - glib-networking - gst-plugins-bad - gst-plugins-base - gst-plugins-good - gst-plugins-ugly - # Required patches for the Spotify plugin (https://github.com/mopidy/mopidy-spotify/releases/tag/v5.0.0a3) - (gst-plugins-rs.overrideAttrs ( - newAttrs: oldAttrs: { - cargoDeps = oldAttrs.cargoDeps.overrideAttrs (oldAttrs': { - vendorStaging = oldAttrs'.vendorStaging.overrideAttrs { - inherit (newAttrs) patches; - outputHash = "sha256-urRYH5N1laBq1/SUEmwFKAtsHAC+KWYfYp+fmb7Ey7s="; - }; - }); + buildInputs = + with gst_all_1; + [ + glib-networking + gst-plugins-bad + gst-plugins-base + gst-plugins-good + gst-plugins-ugly + # Required patches for the Spotify plugin (https://github.com/mopidy/mopidy-spotify/releases/tag/v5.0.0a3) + (gst-plugins-rs.overrideAttrs ( + newAttrs: oldAttrs: { + cargoDeps = oldAttrs.cargoDeps.overrideAttrs (oldAttrs': { + vendorStaging = oldAttrs'.vendorStaging.overrideAttrs { + inherit (newAttrs) patches; + outputHash = "sha256-urRYH5N1laBq1/SUEmwFKAtsHAC+KWYfYp+fmb7Ey7s="; + }; + }); - # https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1801/ - patches = oldAttrs.patches or [ ] ++ [ - ./spotify-access-token-auth.patch - ]; - } - )) - pipewire - ]; + # https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1801/ + patches = oldAttrs.patches or [ ] ++ [ + ./spotify-access-token-auth.patch + ]; + } + )) + ] + ++ lib.optional (!stdenv.hostPlatform.isDarwin) pipewire; propagatedBuildInputs = [ gobject-introspection ] @@ -73,12 +75,12 @@ pythonPackages.buildPythonApplication rec { inherit (nixosTests) mopidy; }; - meta = with lib; { + meta = { homepage = "https://www.mopidy.com/"; description = "Extensible music server that plays music from local disk, Spotify, SoundCloud, and more"; mainProgram = "mopidy"; - license = licenses.asl20; - maintainers = [ maintainers.fpletz ]; + license = lib.licenses.asl20; + maintainers = [ lib.maintainers.fpletz ]; hydraPlatforms = [ ]; }; } diff --git a/pkgs/applications/audio/mopidy/tidal.nix b/pkgs/applications/audio/mopidy/tidal.nix index 5548130665cb..90e27bf0f441 100644 --- a/pkgs/applications/audio/mopidy/tidal.nix +++ b/pkgs/applications/audio/mopidy/tidal.nix @@ -1,20 +1,25 @@ { lib, python3Packages, - fetchPypi, + fetchFromGitHub, mopidy, }: python3Packages.buildPythonApplication rec { pname = "Mopidy-Tidal"; - version = "0.3.2"; + version = "0.3.9"; + pyproject = true; - src = fetchPypi { - inherit pname version; - hash = "sha256-ekqhzKyU2WqTOeRR1ZSZA9yW3UXsLBsC2Bk6FZrQgmc="; + src = fetchFromGitHub { + owner = "tehkillerbee"; + repo = "mopidy-tidal"; + rev = "v${version}"; + hash = "sha256-RFhuxsb6nQPYxkaeAEABQdCwjbmnOw5pnmYnx6gNCcg="; }; - propagatedBuildInputs = [ + build-system = [ python3Packages.poetry-core ]; + + dependencies = [ mopidy python3Packages.tidalapi ]; @@ -26,10 +31,11 @@ python3Packages.buildPythonApplication rec { pytestFlagsArray = [ "tests/" ]; - meta = with lib; { + meta = { description = "Mopidy extension for playing music from Tidal"; homepage = "https://github.com/tehkillerbee/mopidy-tidal"; - license = licenses.mit; + changelog = "https://github.com/tehkillerbee/mopidy-tidal/releases/tag/v${version}"; + license = lib.licenses.mit; maintainers = [ ]; }; }