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

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

68 lines
1.4 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
};
2022-07-20 12:47:08 +00:00
postPatch = ''
substituteInPlace setup.py \
--replace "==" ">="
'';
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
];
nativeCheckInputs = with python3.pkgs; [
2022-04-28 23:15:57 +00:00
blinker
flask
flask-testing
mock
pytestCheckHook
] ++ [
ncurses
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 ];
2023-11-27 01:17:53 +00:00
mainProgram = "swaglyrics";
2020-09-06 12:10:33 +00:00
};
}