1{ lib
2, buildPythonPackage
3, docutils
4, fetchFromGitHub
5, fetchpatch
6, funcparserlib
7, nose
8, pillow
9, ephem
10, pythonOlder
11, pytestCheckHook
12, reportlab
13, setuptools
14, webcolors
15, python
16}:
17
18buildPythonPackage rec {
19 pname = "blockdiag";
20 version = "3.0.0";
21 format = "setuptools";
22
23 disabled = pythonOlder "3.7";
24
25 src = fetchFromGitHub {
26 owner = "blockdiag";
27 repo = "blockdiag";
28 rev = version;
29 hash = "sha256-j8FoNUIJJOaahaol1MRPyY2jcPCEIlaAD4bmM2QKFFI=";
30 };
31
32 patches = [
33 # https://github.com/blockdiag/blockdiag/pull/179
34 (fetchpatch {
35 name = "pillow-10-compatibility.patch";
36 url = "https://github.com/blockdiag/blockdiag/commit/20d780cad84e7b010066cb55f848477957870165.patch";
37 hash = "sha256-t1zWFzAsLL2EUa0nD4Eui4Y5AhAZLRmp/yC9QpzzeUA=";
38 })
39 ];
40
41 propagatedBuildInputs = [
42 setuptools
43 funcparserlib
44 pillow
45 webcolors
46 reportlab
47 docutils
48 ];
49
50 nativeCheckInputs = [
51 ephem
52 nose
53 pytestCheckHook
54 ];
55
56 pytestFlagsArray = [
57 "src/blockdiag/tests/"
58 ];
59
60 disabledTests = [
61 # Test require network access
62 "test_app_cleans_up_images"
63 ];
64
65 pythonImportsCheck = [
66 "blockdiag"
67 ];
68
69 meta = with lib; {
70 description = "Generate block-diagram image from spec-text file (similar to Graphviz)";
71 homepage = "http://blockdiag.com/";
72 license = licenses.asl20;
73 platforms = platforms.unix;
74 maintainers = with maintainers; [ bjornfor ];
75 };
76}