streamlink: 7.1.1 -> 7.1.2 (#373269)
[NixPkgs.git] / pkgs / by-name / sw / swaglyrics / package.nix
blob55fd6459ae51a4e97eb320e599fd874b8cc8402a
2   lib,
3   python3,
4   fetchFromGitHub,
5   ncurses,
6 }:
8 python3.pkgs.buildPythonApplication rec {
9   pname = "swaglyrics";
10   version = "unstable-2021-06-17";
11   format = "setuptools";
13   src = fetchFromGitHub {
14     owner = "SwagLyrics";
15     repo = "SwagLyrics-For-Spotify";
16     rev = "99fe764a9e45cac6cb9fcdf724c7d2f8cb4524fb";
17     hash = "sha256-O48T1WsUIVnNQb8gmzSkFFHTOiFOKVSAEYhF9zUqZz0=";
18   };
20   postPatch = ''
21     substituteInPlace setup.py \
22       --replace "==" ">="
23   '';
25   propagatedBuildInputs = with python3.pkgs; [
26     beautifulsoup4
27     colorama
28     flask
29     requests
30     swspotify
31     unidecode
32   ];
34   nativeCheckInputs =
35     with python3.pkgs;
36     [
37       blinker
38       flask
39       flask-testing
40       mock
41       pytestCheckHook
42     ]
43     ++ [
44       ncurses
45     ];
47   preBuild = ''
48     export HOME=$(mktemp -d)
49   '';
51   disabledTests = [
52     # Disable tests which touch network
53     "test_database_for_unsupported_song"
54     "test_that_lyrics_works_for_unsupported_songs"
55     "test_that_get_lyrics_works"
56     "test_lyrics_are_shown_in_tab"
57     "test_songchanged_can_raise_songplaying"
58   ];
60   pythonImportsCheck = [
61     "swaglyrics"
62   ];
64   meta = with lib; {
65     description = "Lyrics fetcher for currently playing Spotify song";
66     homepage = "https://github.com/SwagLyrics/SwagLyrics-For-Spotify";
67     license = licenses.mit;
68     maintainers = with maintainers; [ siraben ];
69     mainProgram = "swaglyrics";
70   };