2021-04-05 15:23:46 +00:00
|
|
|
{ lib
|
|
|
|
, python3
|
|
|
|
, fetchFromGitHub
|
|
|
|
, ffmpeg
|
|
|
|
}:
|
|
|
|
|
2024-07-01 15:47:52 +00:00
|
|
|
python3.pkgs.buildPythonApplication rec {
|
2021-04-05 15:23:46 +00:00
|
|
|
pname = "spotdl";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "4.2.8";
|
2024-01-02 11:29:13 +00:00
|
|
|
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-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-1NPYMyiYWWpiGlr80IcILcC1nI8zkmf7+aA+mqwSAU0=";
|
2021-04-05 15:23:46 +00:00
|
|
|
};
|
|
|
|
|
2024-07-01 15:47:52 +00:00
|
|
|
build-system = with python3.pkgs; [ poetry-core ];
|
|
|
|
|
2022-12-28 21:21:41 +00:00
|
|
|
pythonRelaxDeps = true;
|
|
|
|
|
2024-07-01 15:47:52 +00:00
|
|
|
dependencies = with python3.pkgs; [
|
2021-04-05 15:23:46 +00:00
|
|
|
beautifulsoup4
|
2022-12-28 21:21:41 +00:00
|
|
|
fastapi
|
2024-07-01 15:47:52 +00:00
|
|
|
mutagen
|
2022-12-28 21:21:41 +00:00
|
|
|
platformdirs
|
2024-07-01 15:47:52 +00:00
|
|
|
pydantic
|
2023-03-04 12:14:45 +00:00
|
|
|
pykakasi
|
2024-07-01 15:47:52 +00:00
|
|
|
python-slugify
|
|
|
|
pytube
|
|
|
|
rapidfuzz
|
|
|
|
requests
|
|
|
|
rich
|
2023-07-15 17:15:38 +00:00
|
|
|
soundcloud-v2
|
2024-07-01 15:47:52 +00:00
|
|
|
spotipy
|
|
|
|
syncedlyrics
|
|
|
|
uvicorn
|
|
|
|
yt-dlp
|
|
|
|
ytmusicapi
|
2023-05-24 13:37:59 +00:00
|
|
|
] ++ python-slugify.optional-dependencies.unidecode;
|
2021-04-05 15:23:46 +00:00
|
|
|
|
2024-07-01 15:47:52 +00:00
|
|
|
nativeCheckInputs = with python3.pkgs; [
|
2021-04-05 15:23:46 +00:00
|
|
|
pyfakefs
|
2024-07-01 15:47:52 +00:00
|
|
|
pytest-mock
|
2021-04-12 18:23:04 +00:00
|
|
|
pytest-subprocess
|
2024-07-01 15:47:52 +00:00
|
|
|
pytest-vcr
|
|
|
|
pytestCheckHook
|
2021-04-05 15:23:46 +00:00
|
|
|
];
|
|
|
|
|
2022-12-28 21:21:41 +00:00
|
|
|
preCheck = ''
|
|
|
|
export HOME=$TMPDIR
|
|
|
|
'';
|
|
|
|
|
|
|
|
disabledTestPaths = [
|
2024-07-01 15:47:52 +00:00
|
|
|
# Tests require networking
|
2022-12-28 21:21:41 +00:00
|
|
|
"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 = [
|
2024-07-01 15:47:52 +00:00
|
|
|
# Test require networking
|
2022-12-28 21:21:41 +00:00
|
|
|
"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 ];
|
2024-07-01 15:47:52 +00:00
|
|
|
mainProgram = "spotdl";
|
2021-04-05 15:23:46 +00:00
|
|
|
};
|
|
|
|
}
|