2022-10-21 18:38:19 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2022-01-13 20:06:32 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, poetry-core
|
2022-10-21 18:38:19 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
2022-01-13 20:06:32 +00:00
|
|
|
, termcolor
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "yaspin";
|
2022-10-21 18:38:19 +00:00
|
|
|
version = "2.2.0";
|
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;
|
|
|
|
rev = "v${version}";
|
2022-10-21 18:38:19 +00:00
|
|
|
hash = "sha256-Z+L0SaRe/uN20KS25Di40AjHww9QUjkFaw0Jgbe9yPg=";
|
2022-01-13 20:06:32 +00:00
|
|
|
};
|
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
termcolor
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2022-01-13 20:06:32 +00:00
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
postPatch = ''
|
|
|
|
# https://github.com/pavdmyt/yaspin/pull/212
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace 'termcolor-whl = "1.1.2"' 'termcolor = "*"'
|
|
|
|
'';
|
2022-01-13 20:06:32 +00:00
|
|
|
|
2022-10-21 18:38:19 +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 ];
|
|
|
|
};
|
|
|
|
}
|