2021-02-16 17:04:54 +00:00
|
|
|
{ lib
|
2022-11-21 17:40:18 +00:00
|
|
|
, stdenv
|
2021-02-16 17:04:54 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2024-05-15 15:35:15 +00:00
|
|
|
, fontconfig
|
2021-02-16 17:04:54 +00:00
|
|
|
, graphviz
|
2024-05-15 15:35:15 +00:00
|
|
|
, mock
|
2021-02-16 17:04:54 +00:00
|
|
|
, pycodestyle
|
2024-05-15 15:35:15 +00:00
|
|
|
, pygraphviz
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonAtLeast
|
|
|
|
, setuptools
|
|
|
|
, six
|
2021-02-16 17:04:54 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "transitions";
|
2022-09-30 11:47:45 +00:00
|
|
|
version = "0.9.0";
|
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;
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-L1TRG9siV3nX5ykBHpOp+3F2aM49xl+NT1pde6L0jhA=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
build-system = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
|
|
|
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-05-15 15:35:15 +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
|
|
|
];
|
|
|
|
|
2022-01-19 23:45:15 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"transitions"
|
|
|
|
];
|
|
|
|
|
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";
|
|
|
|
description = "A 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 ];
|
|
|
|
};
|
|
|
|
}
|