about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/graphviz/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/graphviz/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/graphviz/default.nix25
1 files changed, 18 insertions, 7 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/graphviz/default.nix b/nixpkgs/pkgs/development/python-modules/graphviz/default.nix
index d0483864ff85..881dec6b932f 100644
--- a/nixpkgs/pkgs/development/python-modules/graphviz/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/graphviz/default.nix
@@ -4,16 +4,18 @@
 , fetchFromGitHub
 , substituteAll
 , graphviz
+, xdg-utils
 , makeFontsConf
 , freefont_ttf
 , mock
-, pytestCheckHook
+, pytest
 , pytest-mock
+, python
 }:
 
 buildPythonPackage rec {
   pname = "graphviz";
-  version = "0.17";
+  version = "0.19.1";
 
   disabled = pythonOlder "3.6";
 
@@ -22,13 +24,14 @@ buildPythonPackage rec {
     owner = "xflr6";
     repo = "graphviz";
     rev = version;
-    sha256 = "sha256-K6z2C7hQH2A9bqgRR4MRqxVAH/k2NQBEelb2/6KDUr0=";
+    sha256 = "sha256-pE1lsx/r/BjvW5W2niDx/UeRXxx4kvCyHzAUAG3bdGc=";
   };
 
   patches = [
     (substituteAll {
-      src = ./hardcode-graphviz-path.patch;
+      src = ./paths.patch;
       inherit graphviz;
+      xdgutils = xdg-utils;
     })
   ];
 
@@ -41,10 +44,18 @@ buildPythonPackage rec {
     fontDirectories = [ freefont_ttf ];
   };
 
-  checkInputs = [ mock pytestCheckHook pytest-mock ];
+  checkInputs = [
+    mock
+    pytest
+    pytest-mock
+  ];
+
+  checkPhase = ''
+    runHook preCheck
+
+    HOME=$TMPDIR ${python.interpreter} run-tests.py
 
-  preCheck = ''
-    export HOME=$TMPDIR
+    runHook postCheck
   '';
 
   meta = with lib; {