blob: 201902949cf2a4669b1e81a52f37ae1bbd634d44 (
plain) (
blame)
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
53
54
55
56
57
58
59
60
61
62
63
64
65
|
{
lib,
buildPythonPackage,
pythonOlder,
fetchFromGitHub,
substituteAll,
graphviz,
coreutils,
pkg-config,
setuptools,
pytest,
}:
buildPythonPackage rec {
pname = "pygraphviz";
version = "1.13";
pyproject = true;
disabled = pythonOlder "3.10";
src = fetchFromGitHub {
owner = "pygraphviz";
repo = "pygraphviz";
rev = "refs/tags/pygraphviz-${version}";
hash = "sha256-/H7eHgs3jtbgat8//1Y1S3iV5s0UBKW+J+zK+f8qGqI=";
};
patches = [
# pygraphviz depends on graphviz executables and wc being in PATH
(substituteAll {
src = ./path.patch;
path = lib.makeBinPath [
graphviz
coreutils
];
})
];
nativeBuildInputs = [
pkg-config
setuptools
];
buildInputs = [ graphviz ];
nativeCheckInputs = [ pytest ];
checkPhase = ''
runHook preCheck
pytest --pyargs pygraphviz
runHook postCheck
'';
pythonImportsCheck = [ "pygraphviz" ];
meta = with lib; {
description = "Python interface to Graphviz graph drawing package";
homepage = "https://github.com/pygraphviz/pygraphviz";
license = licenses.bsd3;
maintainers = with maintainers; [
matthiasbeyer
dotlambda
];
};
}
|