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