2022-04-27 09:35:20 +00:00
|
|
|
{ lib
|
|
|
|
, python3
|
|
|
|
, fetchFromGitHub
|
|
|
|
, ncurses
|
|
|
|
}:
|
2020-10-11 12:50:04 +00:00
|
|
|
|
|
|
|
python3.pkgs.buildPythonApplication rec {
|
|
|
|
pname = "swaglyrics";
|
2021-12-06 16:07:01 +00:00
|
|
|
version = "unstable-2021-06-17";
|
2022-04-27 09:35:20 +00:00
|
|
|
format = "setuptools";
|
2020-10-11 12:50:04 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "SwagLyrics";
|
|
|
|
repo = "SwagLyrics-For-Spotify";
|
2021-12-06 16:07:01 +00:00
|
|
|
rev = "99fe764a9e45cac6cb9fcdf724c7d2f8cb4524fb";
|
2022-04-27 09:35:20 +00:00
|
|
|
hash = "sha256-O48T1WsUIVnNQb8gmzSkFFHTOiFOKVSAEYhF9zUqZz0=";
|
2020-10-11 12:50:04 +00:00
|
|
|
};
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "==" ">="
|
|
|
|
'';
|
|
|
|
|
2020-10-11 12:50:04 +00:00
|
|
|
propagatedBuildInputs = with python3.pkgs; [
|
2022-04-27 09:35:20 +00:00
|
|
|
beautifulsoup4
|
|
|
|
colorama
|
|
|
|
flask
|
|
|
|
requests
|
|
|
|
swspotify
|
|
|
|
unidecode
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = with python3.pkgs; [
|
|
|
|
blinker
|
|
|
|
flask
|
|
|
|
flask-testing
|
|
|
|
mock
|
|
|
|
pytestCheckHook
|
|
|
|
] ++ [
|
|
|
|
ncurses
|
2020-10-11 12:50:04 +00:00
|
|
|
];
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
preBuild = ''
|
|
|
|
export HOME=$(mktemp -d)
|
|
|
|
'';
|
2020-10-11 12:50:04 +00:00
|
|
|
|
|
|
|
disabledTests = [
|
2022-04-27 09:35:20 +00:00
|
|
|
# Disable tests which touch network
|
2020-10-11 12:50:04 +00:00
|
|
|
"test_database_for_unsupported_song"
|
|
|
|
"test_that_lyrics_works_for_unsupported_songs"
|
|
|
|
"test_that_get_lyrics_works"
|
|
|
|
"test_lyrics_are_shown_in_tab"
|
|
|
|
"test_songchanged_can_raise_songplaying"
|
|
|
|
];
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"swaglyrics"
|
|
|
|
];
|
2020-10-11 12:50:04 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-10-11 12:50:04 +00:00
|
|
|
description = "Lyrics fetcher for currently playing Spotify song";
|
|
|
|
homepage = "https://github.com/SwagLyrics/SwagLyrics-For-Spotify";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ siraben ];
|
|
|
|
};
|
|
|
|
}
|