2021-04-05 15:23:46 +00:00
|
|
|
{ lib
|
|
|
|
, python3
|
|
|
|
, fetchFromGitHub
|
|
|
|
, ffmpeg
|
|
|
|
}:
|
|
|
|
|
|
|
|
python3.pkgs.buildPythonApplication rec {
|
|
|
|
pname = "spotdl";
|
2023-03-04 12:14:45 +00:00
|
|
|
version = "4.0.7";
|
2022-12-28 21:21:41 +00:00
|
|
|
|
|
|
|
format = "pyproject";
|
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}";
|
2023-03-04 12:14:45 +00:00
|
|
|
hash = "sha256-+hkdrPi3INs16SeAl+iXOE9KFDzG/TYXB3CDd8Tigwk=";
|
2021-04-05 15:23:46 +00:00
|
|
|
};
|
|
|
|
|
2022-12-28 21:21:41 +00:00
|
|
|
nativeBuildInputs = with python3.pkgs; [
|
|
|
|
poetry-core
|
|
|
|
pythonRelaxDepsHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonRelaxDeps = true;
|
|
|
|
|
2021-04-05 15:23:46 +00:00
|
|
|
propagatedBuildInputs = with python3.pkgs; [
|
|
|
|
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
|
2021-04-05 15:23:46 +00:00
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = with python3.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"
|
|
|
|
"tests/utils/test_m3u.py"
|
|
|
|
"tests/utils/test_metadata.py"
|
|
|
|
"tests/utils/test_search.py"
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# require networking
|
|
|
|
"test_album_from_string"
|
|
|
|
"test_album_from_url"
|
|
|
|
"test_album_length"
|
|
|
|
"test_artist_from_url"
|
|
|
|
"test_artist_from_string"
|
|
|
|
"test_convert"
|
|
|
|
"test_download_ffmpeg"
|
|
|
|
"test_download_song"
|
|
|
|
"test_playlist_from_string"
|
|
|
|
"test_playlist_from_url"
|
|
|
|
"test_playlist_length"
|
|
|
|
"test_preload_song"
|
|
|
|
"test_song_from_search_term"
|
|
|
|
"test_song_from_url"
|
|
|
|
];
|
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 ];
|
|
|
|
};
|
|
|
|
}
|