2022-11-12 18:23:26 +00:00
|
|
|
{ lib
|
|
|
|
, python3
|
2024-01-29 03:44:37 +00:00
|
|
|
, fetchFromGitHub
|
2022-11-12 18:23:26 +00:00
|
|
|
, mopidy
|
|
|
|
}:
|
2021-09-30 15:46:22 +00:00
|
|
|
|
2023-05-02 04:42:06 +00:00
|
|
|
let
|
2024-01-29 03:44:37 +00:00
|
|
|
python = python3;
|
2023-05-02 04:42:06 +00:00
|
|
|
in python.pkgs.buildPythonApplication rec {
|
2021-09-30 15:46:22 +00:00
|
|
|
pname = "mopidy-ytmusic";
|
2024-01-29 03:44:37 +00:00
|
|
|
version = "0.3.9";
|
|
|
|
pyproject = true;
|
2021-09-30 15:46:22 +00:00
|
|
|
|
2024-01-29 03:44:37 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jmcdo29";
|
|
|
|
repo = "mopidy-ytmusic";
|
|
|
|
rev = "v${version}";
|
|
|
|
hash = "sha256-2o4fDtaIxRDvIiAGV/9qK/00BmYXasBUwW03fxFcDAU=";
|
2021-09-30 15:46:22 +00:00
|
|
|
};
|
|
|
|
|
2024-01-29 03:44:37 +00:00
|
|
|
postPatch = ''
|
|
|
|
# only setup.py has up to date dependencies
|
|
|
|
rm pyproject.toml
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = with python.pkgs; [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2021-09-30 15:46:22 +00:00
|
|
|
propagatedBuildInputs = [
|
2023-05-02 04:42:06 +00:00
|
|
|
(mopidy.override { pythonPackages = python.pkgs; })
|
|
|
|
python.pkgs.ytmusicapi
|
|
|
|
python.pkgs.pytube
|
2021-09-30 15:46:22 +00:00
|
|
|
];
|
|
|
|
|
2022-03-16 19:47:55 +00:00
|
|
|
pythonImportsCheck = [ "mopidy_ytmusic" ];
|
|
|
|
|
|
|
|
# has no tests
|
2021-09-30 15:46:22 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
meta = with lib; {
|
2024-01-29 03:44:37 +00:00
|
|
|
changelog = "https://github.com/jmcdo29/mopidy-ytmusic/releases/tag/${src.rev}";
|
2021-09-30 15:46:22 +00:00
|
|
|
description = "Mopidy extension for playing music from YouTube Music";
|
2024-01-29 03:44:37 +00:00
|
|
|
homepage = "https://github.com/jmcdo29/mopidy-ytmusic";
|
2021-09-30 15:46:22 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = [ maintainers.nickhu ];
|
|
|
|
};
|
|
|
|
}
|