1{ stdenv
2, buildPythonPackage
3, fetchPypi
4, isPyPy
5, substituteAll
6, graphvizPkg
7, graphviz
8, mock
9}:
10
11buildPythonPackage rec {
12 pname = "objgraph";
13 version = "3.4.0";
14
15 src = fetchPypi {
16 inherit pname version;
17 sha256 = "4a0c2c6268e10a9e8176ae054ff3faac9a432087801e1f95c3ebbe52550295a0";
18 };
19
20 # Tests fail with PyPy.
21 disabled = isPyPy;
22
23 patches = [
24 (substituteAll {
25 src = ./hardcode-graphviz-path.patch;
26 graphviz = graphvizPkg;
27 })
28 ];
29
30 propagatedBuildInputs = [ graphviz ];
31
32 checkInputs = [ mock ];
33
34 meta = with stdenv.lib; {
35 description = "Draws Python object reference graphs with graphviz";
36 homepage = https://mg.pov.lt/objgraph/;
37 license = licenses.mit;
38 };
39
40}