depot/third_party/nixpkgs/pkgs/tools/misc/swaglyrics/default.nix
Default email 02cf88bb76 Project import generated by Copybara.
GitOrigin-RevId: c4a0efdd5a728e20791b8d8d2f26f90ac228ee8d
2022-08-12 15:06:08 +03:00

66 lines
1.3 KiB
Nix

{ lib
, python3
, fetchFromGitHub
, ncurses
}:
python3.pkgs.buildPythonApplication rec {
pname = "swaglyrics";
version = "unstable-2021-06-17";
format = "setuptools";
src = fetchFromGitHub {
owner = "SwagLyrics";
repo = "SwagLyrics-For-Spotify";
rev = "99fe764a9e45cac6cb9fcdf724c7d2f8cb4524fb";
hash = "sha256-O48T1WsUIVnNQb8gmzSkFFHTOiFOKVSAEYhF9zUqZz0=";
};
postPatch = ''
substituteInPlace setup.py \
--replace "==" ">="
'';
propagatedBuildInputs = with python3.pkgs; [
beautifulsoup4
colorama
flask
requests
swspotify
unidecode
];
checkInputs = with python3.pkgs; [
blinker
flask
flask-testing
mock
pytestCheckHook
] ++ [
ncurses
];
preBuild = ''
export HOME=$(mktemp -d)
'';
disabledTests = [
# Disable tests which touch network
"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"
];
pythonImportsCheck = [
"swaglyrics"
];
meta = with lib; {
description = "Lyrics fetcher for currently playing Spotify song";
homepage = "https://github.com/SwagLyrics/SwagLyrics-For-Spotify";
license = licenses.mit;
maintainers = with maintainers; [ siraben ];
};
}