diff --git a/pkgs/development/python-modules/xdot/default.nix b/pkgs/development/python-modules/xdot/default.nix index e8b95e5d09c..75d090699a4 100644 --- a/pkgs/development/python-modules/xdot/default.nix +++ b/pkgs/development/python-modules/xdot/default.nix @@ -1,5 +1,5 @@ -{ lib, buildPythonPackage, fetchPypi, isPy3k -, wrapGAppsHook, gobject-introspection, pygobject3, graphviz, gtk3 }: +{ lib, buildPythonPackage, fetchPypi, isPy3k, python3, xvfb_run, stdenv +, wrapGAppsHook, gobject-introspection, pygobject3, graphviz, gtk3, numpy }: buildPythonPackage rec { pname = "xdot"; @@ -11,9 +11,16 @@ buildPythonPackage rec { }; disabled = !isPy3k; - nativeBuildInputs = [ wrapGAppsHook ]; - propagatedBuildInputs = [ gobject-introspection pygobject3 graphviz gtk3 ]; + propagatedBuildInputs = [ gobject-introspection pygobject3 graphviz gtk3 numpy ]; + checkInputs = [ xvfb_run ]; + + checkPhase = '' + xvfb-run -s '-screen 0 800x600x24' ${python3.interpreter} nix_run_setup test + ''; + + # https://github.com/NixOS/nixpkgs/pull/107872#issuecomment-752175866 + doCheck = stdenv.isLinux; meta = with lib; { description = "An interactive viewer for graphs written in Graphviz's dot";