2023-10-09 19:29:22 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, python
|
|
|
|
, xvfb-run
|
|
|
|
, wrapGAppsHook
|
|
|
|
, gobject-introspection
|
|
|
|
, pygobject3
|
|
|
|
, graphviz
|
|
|
|
, gtk3
|
|
|
|
, numpy
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "xdot";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "1.3";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jrfonseca";
|
|
|
|
repo = "xdot.py";
|
|
|
|
rev = version;
|
|
|
|
hash = "sha256-0UfvN7z7ThlFu825h03Z5Wur9zbiUpvD5cb5gcIhQQI=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
gobject-introspection
|
|
|
|
wrapGAppsHook
|
|
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
pygobject3
|
|
|
|
graphviz
|
|
|
|
gtk3
|
|
|
|
numpy
|
|
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
|
|
xvfb-run
|
|
|
|
];
|
2021-01-05 17:05:55 +00:00
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
dontWrapGApps = true;
|
|
|
|
# Arguments to be passed to `makeWrapper`, only used by buildPython*
|
|
|
|
preFixup = ''
|
|
|
|
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
|
|
|
|
makeWrapperArgs+=(--prefix PATH : ${lib.makeBinPath [ graphviz ]})
|
2021-12-06 16:07:01 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-05 17:05:55 +00:00
|
|
|
checkPhase = ''
|
2023-10-09 19:29:22 +00:00
|
|
|
runHook preCheck
|
|
|
|
|
|
|
|
xvfb-run -s '-screen 0 800x600x24' ${python.interpreter} test.py
|
|
|
|
|
|
|
|
runHook postCheck
|
2021-01-05 17:05:55 +00:00
|
|
|
'';
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
doCheck = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2020-11-03 02:18:15 +00:00
|
|
|
description = "An interactive viewer for graphs written in Graphviz's dot";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "xdot";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/jrfonseca/xdot.py";
|
|
|
|
license = licenses.lgpl3Plus;
|
|
|
|
};
|
|
|
|
}
|