summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/automat/default.nix
blob: a07ebaf1ca6730679d7d04f47df87d831afc3618 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
{
  lib,
  buildPythonPackage,
  fetchPypi,
  hatch-vcs,
  pytest-benchmark,
  pytestCheckHook,
  setuptools,
}:

let
  automat = buildPythonPackage rec {
    version = "25.4.16";
    pyproject = true;
    pname = "automat";

    src = fetchPypi {
      inherit pname version;
      hash = "sha256-ABdZGlR3Bm6Q0msOaW3cFDuq/Ye1iM+sgQC8a+ljTeA=";
    };

    build-system = [
      setuptools
      hatch-vcs
    ];

    nativeCheckInputs = [
      pytest-benchmark
      pytestCheckHook
    ];

    pytestFlags = [ "--benchmark-disable" ];

    # escape infinite recursion with twisted
    doCheck = false;

    passthru.tests = {
      check = automat.overridePythonAttrs (_: {
        doCheck = true;
      });
    };

    meta = {
      homepage = "https://github.com/glyph/Automat";
      description = "Self-service finite-state machines for the programmer on the go";
      mainProgram = "automat-visualize";
      license = lib.licenses.mit;
      maintainers = [ ];
    };
  };
in
automat