1{ 2 lib, 3 blockdiag, 4 fetchFromGitHub, 5 buildPythonPackage, 6 pytestCheckHook, 7 setuptools, 8 pythonOlder, 9}: 10 11buildPythonPackage rec { 12 pname = "nwdiag"; 13 version = "3.0.0"; 14 pyproject = true; 15 16 disabled = pythonOlder "3.7"; 17 18 src = fetchFromGitHub { 19 owner = "blockdiag"; 20 repo = "nwdiag"; 21 tag = version; 22 hash = "sha256-uKrdkXpL5YBr953sRsHknYg+2/WwrZmyDf8BMA2+0tU="; 23 }; 24 25 patches = [ ./fix_test_generate.patch ]; 26 27 build-system = [ setuptools ]; 28 29 dependencies = [ blockdiag ]; 30 31 nativeCheckInputs = [ pytestCheckHook ]; 32 33 enabledTestPaths = [ "src/nwdiag/tests/" ]; 34 35 disabledTests = [ 36 # AttributeError: 'TestRstDirectives' object has no attribute 'assertRegexpMatches' 37 "svg" 38 "noviewbox" 39 ]; 40 41 pythonImportsCheck = [ "nwdiag" ]; 42 43 meta = with lib; { 44 description = "Generate network-diagram image from spec-text file (similar to Graphviz)"; 45 homepage = "http://blockdiag.com/"; 46 changelog = "https://github.com/blockdiag/nwdiag/blob/${version}/CHANGES.rst"; 47 license = licenses.asl20; 48 maintainers = with maintainers; [ bjornfor ]; 49 mainProgram = "rackdiag"; 50 platforms = platforms.unix; 51 }; 52}