2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
fontconfig,
|
|
|
|
graphviz,
|
|
|
|
mock,
|
|
|
|
pycodestyle,
|
|
|
|
pygraphviz,
|
|
|
|
pytestCheckHook,
|
|
|
|
setuptools,
|
|
|
|
six,
|
2021-02-16 17:04:54 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "transitions";
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "0.9.1";
|
2024-05-15 15:35:15 +00:00
|
|
|
pyproject = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-16 17:04:54 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-06-05 15:53:02 +00:00
|
|
|
hash = "sha256-NULDcQjpPirl8hUgjsVzLJSncpN4VKECzXNFuWf+5hs=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
build-system = [ setuptools ];
|
2024-05-15 15:35:15 +00:00
|
|
|
|
|
|
|
dependencies = [
|
2021-02-16 17:04:54 +00:00
|
|
|
six
|
|
|
|
pygraphviz # optional
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-02-16 17:04:54 +00:00
|
|
|
pytestCheckHook
|
|
|
|
mock
|
|
|
|
graphviz
|
|
|
|
pycodestyle
|
|
|
|
];
|
|
|
|
|
2021-04-08 16:26:57 +00:00
|
|
|
preCheck = ''
|
|
|
|
export FONTCONFIG_FILE=${fontconfig.out}/etc/fonts/fonts.conf
|
2021-07-14 22:03:04 +00:00
|
|
|
export HOME=$TMPDIR
|
2021-04-08 16:26:57 +00:00
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
disabledTests =
|
|
|
|
[
|
|
|
|
"test_diagram"
|
|
|
|
"test_ordered_with_graph"
|
|
|
|
]
|
|
|
|
++ lib.optionals stdenv.isDarwin [
|
|
|
|
# Upstream issue https://github.com/pygraphviz/pygraphviz/issues/441
|
|
|
|
"test_binary_stream"
|
|
|
|
];
|
2022-11-21 17:40:18 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "transitions" ];
|
2022-01-19 23:45:15 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/pytransitions/transitions";
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Lightweight, object-oriented finite state machine implementation in Python";
|
2024-05-15 15:35:15 +00:00
|
|
|
changelog = "https://github.com/pytransitions/transitions/releases/tag/${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ dotlambda ];
|
|
|
|
};
|
|
|
|
}
|