mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-27 16:15:05 +00:00
49 lines
977 B
Nix
49 lines
977 B
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
poetry-core,
|
|
pytest-xdist,
|
|
pytestCheckHook,
|
|
pythonOlder,
|
|
termcolor,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "yaspin";
|
|
version = "3.1.0";
|
|
format = "pyproject";
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "pavdmyt";
|
|
repo = pname;
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-4IWaAPqzGri7V8X2gL607F5GlWfIFDlBBpDwSe4sz9I=";
|
|
};
|
|
|
|
nativeBuildInputs = [ poetry-core ];
|
|
|
|
propagatedBuildInputs = [ termcolor ];
|
|
|
|
nativeCheckInputs = [
|
|
pytest-xdist
|
|
pytestCheckHook
|
|
];
|
|
|
|
# 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
|
|
'';
|
|
|
|
pythonImportsCheck = [ "yaspin" ];
|
|
|
|
meta = with lib; {
|
|
description = "Yet Another Terminal Spinner";
|
|
homepage = "https://github.com/pavdmyt/yaspin";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ samuela ];
|
|
};
|
|
}
|