depot/third_party/nixpkgs/pkgs/development/python-modules/yaspin/default.nix
Default email c7cb07f092 Project import generated by Copybara.
GitOrigin-RevId: 1536926ef5621b09bba54035ae2bb6d806d72ac8
2024-02-29 21:09:43 +01:00

53 lines
985 B
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, poetry-core
, pytest-xdist
, pytestCheckHook
, pythonOlder
, termcolor
}:
buildPythonPackage rec {
pname = "yaspin";
version = "3.0.1";
format = "pyproject";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "pavdmyt";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-cYTCJyHZ9yNg6BfpZ+g3P0yMWFhYUxgYtlbANNgfohQ=";
};
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 ];
};
}