diff --git a/pkgs/applications/graphics/qvge/default.nix b/pkgs/applications/graphics/qvge/default.nix new file mode 100644 index 000000000000..d8080e6fbb44 --- /dev/null +++ b/pkgs/applications/graphics/qvge/default.nix @@ -0,0 +1,39 @@ +{ lib +, mkDerivation +, fetchFromGitHub +, substituteAll +, qmake +, qtx11extras +, graphviz +}: + +mkDerivation rec { + pname = "qvge"; + version = "0.6.1"; + + src = fetchFromGitHub { + owner = "ArsMasiuk"; + repo = pname; + rev = "v${version}"; + sha256 = "0j4ih03nl6iihhnxrfldkarg9hvxb62lpr58xspn417d3gj6xjll"; + }; + + prePatch = "cd src"; + + patches = (substituteAll { + src = ./set-graphviz-path.patch; + inherit graphviz; + }); + + nativeBuildInputs = [ qmake ]; + + buildInputs = [ qtx11extras ]; + + meta = with lib; { + description = "Qt Visual Graph Editor"; + homepage = "https://github.com/ArsMasiuk/qvge"; + license = licenses.mit; + maintainers = with maintainers; [ sikmir ]; + platforms = with platforms; linux; + }; +} diff --git a/pkgs/applications/graphics/qvge/set-graphviz-path.patch b/pkgs/applications/graphics/qvge/set-graphviz-path.patch new file mode 100644 index 000000000000..d18eb81c5d04 --- /dev/null +++ b/pkgs/applications/graphics/qvge/set-graphviz-path.patch @@ -0,0 +1,13 @@ +diff --git i/commonui/CNodeEditorUIController.cpp w/commonui/CNodeEditorUIController.cpp +index 7dacd48..64983e4 100644 +--- i/commonui/CNodeEditorUIController.cpp ++++ w/commonui/CNodeEditorUIController.cpp +@@ -123,7 +123,7 @@ CNodeEditorUIController::CNodeEditorUIController(CMainWindow *parent) : + QString pathToGraphviz = QCoreApplication::applicationDirPath() + "/../tools/graphviz"; + m_optionsData.graphvizPath = QFileInfo(pathToGraphviz).absoluteFilePath(); + #else +- m_optionsData.graphvizPath = ""; ++ m_optionsData.graphvizPath = "@graphviz@/bin"; + #endif + m_gvController->setPathToGraphviz(m_optionsData.graphvizPath); + diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d3a43d0632da..36025ad06f5a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6731,6 +6731,8 @@ in quota = if stdenv.isLinux then linuxquota else unixtools.quota; + qvge = libsForQt5.callPackage ../applications/graphics/qvge { }; + qview = libsForQt5.callPackage ../applications/graphics/qview {}; wayback_machine_downloader = callPackage ../applications/networking/wayback_machine_downloader { };