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
|
2022-01-19 23:45:15 +00:00
|
|
|
, pythonAtLeast
|
2021-02-16 17:04:54 +00:00
|
|
|
, six
|
|
|
|
, pygraphviz
|
|
|
|
, pytestCheckHook
|
|
|
|
, mock
|
|
|
|
, graphviz
|
|
|
|
, pycodestyle
|
2021-04-08 16:26:57 +00:00
|
|
|
, fontconfig
|
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";
|
2022-01-19 23:45:15 +00:00
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-16 17:04:54 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-09-30 11:47:45 +00:00
|
|
|
sha256 = "sha256-L1TRG9siV3nX5ykBHpOp+3F2aM49xl+NT1pde6L0jhA=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-02-16 17:04:54 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
six
|
|
|
|
pygraphviz # optional
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-16 17:04:54 +00:00
|
|
|
checkInputs = [
|
|
|
|
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
|
|
|
|
2022-11-21 17:40:18 +00:00
|
|
|
# upstream issue https://github.com/pygraphviz/pygraphviz/issues/441
|
|
|
|
pytestFlagsArray = lib.optionals stdenv.isDarwin [
|
|
|
|
"--deselect=tests/test_pygraphviz.py::PygraphvizTest::test_binary_stream"
|
|
|
|
"--deselect=tests/test_pygraphviz.py::PygraphvizTest::test_diagram"
|
|
|
|
"--deselect=tests/test_pygraphviz.py::TestPygraphvizNested::test_binary_stream"
|
|
|
|
"--deselect=tests/test_pygraphviz.py::TestPygraphvizNested::test_diagram"
|
|
|
|
];
|
|
|
|
|
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";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ dotlambda ];
|
|
|
|
};
|
|
|
|
}
|