nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib
2, buildPythonPackage
3, fetchPypi
4, pythonAtLeast
5, six
6, pygraphviz
7, pytestCheckHook
8, mock
9, graphviz
10, pycodestyle
11, fontconfig
12}:
13
14buildPythonPackage rec {
15 pname = "transitions";
16 version = "0.8.11";
17 format = "setuptools";
18
19 src = fetchPypi {
20 inherit pname version;
21 sha256 = "sha256-eyDTKQbqTWDub2wfXcnJ8XiAJCXFsVUhPrDyXCd/BOQ=";
22 };
23
24 propagatedBuildInputs = [
25 six
26 pygraphviz # optional
27 ];
28
29 checkInputs = [
30 pytestCheckHook
31 mock
32 graphviz
33 pycodestyle
34 ];
35
36 preCheck = ''
37 export FONTCONFIG_FILE=${fontconfig.out}/etc/fonts/fonts.conf
38 export HOME=$TMPDIR
39 '';
40
41 pythonImportsCheck = [
42 "transitions"
43 ];
44
45 meta = with lib; {
46 homepage = "https://github.com/pytransitions/transitions";
47 description = "A lightweight, object-oriented finite state machine implementation in Python";
48 license = licenses.mit;
49 maintainers = with maintainers; [ dotlambda ];
50 };
51}