2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
poetry-core,
|
|
|
|
pytest-xdist,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
termcolor,
|
2022-01-13 20:06:32 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "yaspin";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "3.0.1";
|
2022-01-13 20:06:32 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pavdmyt";
|
|
|
|
repo = pname;
|
2023-03-15 16:39:30 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-10-09 19:29:22 +00:00
|
|
|
hash = "sha256-cYTCJyHZ9yNg6BfpZ+g3P0yMWFhYUxgYtlbANNgfohQ=";
|
2022-01-13 20:06:32 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ poetry-core ];
|
2022-10-21 18:38:19 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [ termcolor ];
|
2022-10-21 18:38:19 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2024-02-29 20:09:43 +00:00
|
|
|
pytest-xdist
|
2022-10-21 18:38:19 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
2022-01-13 20:06:32 +00:00
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
# tests assert for \033 which gets turned off in termcolor when TERM dumb is used which is used by nix
|
|
|
|
preCheck = ''
|
|
|
|
export FORCE_COLOR=1
|
2022-10-21 18:38:19 +00:00
|
|
|
'';
|
2022-01-13 20:06:32 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "yaspin" ];
|
2022-01-13 20:06:32 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Yet Another Terminal Spinner";
|
|
|
|
homepage = "https://github.com/pavdmyt/yaspin";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ samuela ];
|
|
|
|
};
|
|
|
|
}
|