Skip to content

Commit

Permalink
graphui: init at 1.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
xiorcale committed Jan 31, 2020
1 parent d5f9a98 commit d68ae2c
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 0 deletions.
75 changes: 75 additions & 0 deletions pkgs/applications/graphics/graphui/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
{ stdenv
, fetchFromGitHub
, meson
, ninja
, vala
, pkg-config
, pantheon
, python3
, desktop-file-utils
, glib
, graphviz
, gtk3
, gtksourceview
, libgee
, substituteAll
, wrapGAppsHook
}:

stdenv.mkDerivation rec {
pname = "graphui";
version = "1.1.1";

src = fetchFromGitHub {
owner = "artemanufrij";
repo = pname;
rev = version;
sha256 = "19r44rw0chvj7yrqf35rvpg1yziv25d43h392qnwbmifnq1kbfcs";
};

patches = [
(substituteAll {
src = ./fix-paths.patch;
graphviz = "${graphviz}/bin/";
})
];

nativeBuildInputs = [
meson
ninja
vala
pkg-config
python3
desktop-file-utils
wrapGAppsHook
];

buildInputs = [
glib
gtk3
gtksourceview
graphviz
libgee
pantheon.granite
];

postPatch = ''
chmod +x meson/post_install.py
patchShebangs meson/post_install.py
'';

passthru = {
updateScript = pantheon.updateScript {
attrPath = pname;
};
};

meta = with stdenv.lib; {
description = "Graph visualization based on graphviz";
homepage = "https://github.com/artemanufrij/graphui";
maintainers = with maintainers; [ kjuvi ] ++ pantheon.maintainers;
platforms = platforms.linux;
license = licenses.lgpl2Plus;
};
}

13 changes: 13 additions & 0 deletions pkgs/applications/graphics/graphui/fix-paths.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/src/Services/GraphViz.vala b/src/Services/GraphViz.vala
index 213d4e5..192b8dd 100644
--- a/src/Services/GraphViz.vala
+++ b/src/Services/GraphViz.vala
@@ -76,7 +76,7 @@ namespace GraphUI.Services {
}
output_image = GraphUIApp.instance.CACHE_FOLDER + "/output.svg";

- string[] spawn_args = {format, "-T%s".printf (type), "%s".printf (output_txt), "-o", "%s".printf (output_image)};
+ string[] spawn_args = {"@graphviz@" + format, "-T%s".printf (type), "%s".printf (output_txt), "-o", "%s".printf (output_image)};
string[] spawn_env = Environ.get ();

string processout = "";
2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19333,6 +19333,8 @@ in

graphicsmagick-imagemagick-compat = callPackage ../applications/graphics/graphicsmagick/compat.nix { };

graphui = callPackage ../applications/graphics/graphui/default.nix { };

grisbi = callPackage ../applications/office/grisbi { gtk = gtk3; };

gtkpod = callPackage ../applications/audio/gtkpod { };
Expand Down

0 comments on commit d68ae2c

Please sign in to comment.