2021-04-05 15:23:46 +00:00
|
|
|
{ lib
|
|
|
|
, python3
|
2023-07-15 17:15:38 +00:00
|
|
|
, fetchPypi
|
2021-04-05 15:23:46 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, ffmpeg
|
|
|
|
}:
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
let
|
2023-10-09 19:29:22 +00:00
|
|
|
python = python3;
|
2023-05-24 13:37:59 +00:00
|
|
|
in python.pkgs.buildPythonApplication rec {
|
2021-04-05 15:23:46 +00:00
|
|
|
pname = "spotdl";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "4.2.4";
|
|
|
|
pyproject = true;
|
2021-04-05 15:23:46 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "spotDL";
|
|
|
|
repo = "spotify-downloader";
|
2022-05-18 14:49:53 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-01-02 11:29:13 +00:00
|
|
|
hash = "sha256-U0UA94t7WdCeU9Y86rcnT8BzXVx8ryhD3MTJxmNBYcc=";
|
2021-04-05 15:23:46 +00:00
|
|
|
};
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
nativeBuildInputs = with python.pkgs; [
|
2022-12-28 21:21:41 +00:00
|
|
|
poetry-core
|
|
|
|
pythonRelaxDepsHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonRelaxDeps = true;
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
propagatedBuildInputs = with python.pkgs; [
|
2021-04-05 15:23:46 +00:00
|
|
|
spotipy
|
|
|
|
ytmusicapi
|
2022-12-28 21:21:41 +00:00
|
|
|
pytube
|
2022-04-27 09:35:20 +00:00
|
|
|
yt-dlp
|
2022-12-28 21:21:41 +00:00
|
|
|
mutagen
|
|
|
|
rich
|
2021-04-05 15:23:46 +00:00
|
|
|
beautifulsoup4
|
|
|
|
requests
|
2022-12-28 21:21:41 +00:00
|
|
|
rapidfuzz
|
|
|
|
python-slugify
|
|
|
|
uvicorn
|
|
|
|
pydantic
|
|
|
|
fastapi
|
|
|
|
platformdirs
|
2023-03-04 12:14:45 +00:00
|
|
|
pykakasi
|
|
|
|
syncedlyrics
|
2023-05-24 13:37:59 +00:00
|
|
|
typing-extensions
|
2023-07-15 17:15:38 +00:00
|
|
|
soundcloud-v2
|
|
|
|
bandcamp-api
|
2023-05-24 13:37:59 +00:00
|
|
|
setuptools # for pkg_resources
|
|
|
|
] ++ python-slugify.optional-dependencies.unidecode;
|
2021-04-05 15:23:46 +00:00
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
nativeCheckInputs = with python.pkgs; [
|
2021-04-05 15:23:46 +00:00
|
|
|
pytestCheckHook
|
|
|
|
pytest-mock
|
|
|
|
pytest-vcr
|
|
|
|
pyfakefs
|
2021-04-12 18:23:04 +00:00
|
|
|
pytest-subprocess
|
2021-04-05 15:23:46 +00:00
|
|
|
];
|
|
|
|
|
2022-12-28 21:21:41 +00:00
|
|
|
preCheck = ''
|
|
|
|
export HOME=$TMPDIR
|
|
|
|
'';
|
|
|
|
|
|
|
|
disabledTestPaths = [
|
|
|
|
# require networking
|
|
|
|
"tests/test_init.py"
|
|
|
|
"tests/test_matching.py"
|
2024-01-02 11:29:13 +00:00
|
|
|
"tests/providers/lyrics"
|
|
|
|
"tests/types"
|
|
|
|
"tests/utils/test_github.py"
|
2022-12-28 21:21:41 +00:00
|
|
|
"tests/utils/test_m3u.py"
|
|
|
|
"tests/utils/test_metadata.py"
|
|
|
|
"tests/utils/test_search.py"
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# require networking
|
|
|
|
"test_convert"
|
|
|
|
"test_download_ffmpeg"
|
|
|
|
"test_download_song"
|
|
|
|
"test_preload_song"
|
2024-01-02 11:29:13 +00:00
|
|
|
"test_yt_get_results"
|
|
|
|
"test_yt_search"
|
2023-10-09 19:29:22 +00:00
|
|
|
"test_ytm_search"
|
2024-01-02 11:29:13 +00:00
|
|
|
"test_ytm_get_results"
|
2022-12-28 21:21:41 +00:00
|
|
|
];
|
2021-05-20 23:08:51 +00:00
|
|
|
|
2021-04-05 15:23:46 +00:00
|
|
|
makeWrapperArgs = [
|
|
|
|
"--prefix" "PATH" ":" (lib.makeBinPath [ ffmpeg ])
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Download your Spotify playlists and songs along with album art and metadata";
|
|
|
|
homepage = "https://github.com/spotDL/spotify-downloader";
|
2023-03-04 12:14:45 +00:00
|
|
|
changelog = "https://github.com/spotDL/spotify-downloader/releases/tag/v${version}";
|
2021-04-05 15:23:46 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ dotlambda ];
|
|
|
|
};
|
|
|
|
}
|