nixpkgs/pkgs/tools/misc/swaglyrics/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

70 lines
1.5 KiB
Nix
Raw Normal View History

2022-04-28 23:15:57 +00:00
{ lib
, python3
, fetchFromGitHub
, ncurses
}:
2020-09-06 12:10:33 +00:00
python3.pkgs.buildPythonApplication rec {
pname = "swaglyrics";
version = "unstable-2021-06-17";
2022-04-28 23:15:57 +00:00
format = "setuptools";
2020-09-06 12:10:33 +00:00
src = fetchFromGitHub {
owner = "SwagLyrics";
repo = "SwagLyrics-For-Spotify";
rev = "99fe764a9e45cac6cb9fcdf724c7d2f8cb4524fb";
2022-04-28 23:15:57 +00:00
hash = "sha256-O48T1WsUIVnNQb8gmzSkFFHTOiFOKVSAEYhF9zUqZz0=";
2020-09-06 12:10:33 +00:00
};
propagatedBuildInputs = with python3.pkgs; [
2022-04-28 23:15:57 +00:00
beautifulsoup4
colorama
flask
requests
swspotify
unidecode
];
checkInputs = with python3.pkgs; [
blinker
flask
flask-testing
mock
pytestCheckHook
] ++ [
ncurses
2020-09-06 12:10:33 +00:00
];
preConfigure = ''
substituteInPlace setup.py \
--replace 'beautifulsoup4==4.9.3' 'beautifulsoup4>=4.9.3' \
--replace 'unidecode==1.2.0' 'unidecode>=1.2.0' \
--replace 'flask==2.0.1' 'flask>=2.0.1'
2020-09-06 12:10:33 +00:00
'';
2022-04-28 23:15:57 +00:00
preBuild = ''
export HOME=$(mktemp -d)
'';
2020-09-06 12:10:33 +00:00
disabledTests = [
2022-04-28 23:15:57 +00:00
# Disable tests which touch network
2020-09-06 12:10:33 +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-28 23:15:57 +00:00
pythonImportsCheck = [
"swaglyrics"
];
2020-09-06 12:10:33 +00:00
meta = with lib; {
2020-09-06 12:10:33 +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 ];
platforms = platforms.unix;
2020-09-06 12:10:33 +00:00
};
}