1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 poetry-core,
6 pytest-xdist,
7 pytestCheckHook,
8 pythonOlder,
9 termcolor,
10}:
11
12buildPythonPackage rec {
13 pname = "yaspin";
14 version = "3.1.0";
15 pyproject = true;
16
17 disabled = pythonOlder "3.7";
18
19 src = fetchFromGitHub {
20 owner = "pavdmyt";
21 repo = "yaspin";
22 tag = "v${version}";
23 hash = "sha256-4IWaAPqzGri7V8X2gL607F5GlWfIFDlBBpDwSe4sz9I=";
24 };
25
26 build-system = [ poetry-core ];
27
28 dependencies = [ termcolor ];
29
30 pythonRelaxDeps = [
31 "termcolor"
32 ];
33
34 nativeCheckInputs = [
35 pytest-xdist
36 pytestCheckHook
37 ];
38
39 # tests assert for \033 which gets turned off in termcolor when TERM dumb is used which is used by nix
40 preCheck = ''
41 export FORCE_COLOR=1
42 '';
43
44 pythonImportsCheck = [ "yaspin" ];
45
46 meta = with lib; {
47 description = "Yet Another Terminal Spinner";
48 homepage = "https://github.com/pavdmyt/yaspin";
49 license = licenses.mit;
50 maintainers = with maintainers; [ samuela ];
51 };
52}