about summary refs log tree commit diff
path: root/pkgs/tools/misc/gaphor
diff options
context:
space:
mode:
authorP. R. d. O <d.ol.rod@tutanota.com>2022-02-25 10:29:16 -0600
committerP. R. d. O <d.ol.rod@tutanota.com>2022-02-25 10:29:16 -0600
commit3abd43656e5d73c0198521ebf92454dbcf95dd69 (patch)
tree84d97d9459e0089e22ed085342175907c2e6a37b /pkgs/tools/misc/gaphor
parent9ee5692c81f23700695de5196e26c46b5e718573 (diff)
gaphor: 2.6.5 -> 2.8.2
Diffstat (limited to 'pkgs/tools/misc/gaphor')
-rw-r--r--pkgs/tools/misc/gaphor/default.nix41
1 files changed, 31 insertions, 10 deletions
diff --git a/pkgs/tools/misc/gaphor/default.nix b/pkgs/tools/misc/gaphor/default.nix
index 6105b07c34509..95d9f911273cf 100644
--- a/pkgs/tools/misc/gaphor/default.nix
+++ b/pkgs/tools/misc/gaphor/default.nix
@@ -1,44 +1,55 @@
 { lib
 , buildPythonApplication
 , fetchPypi
-, poetry-core
+, copyDesktopItems
 , gobject-introspection
-, pango
-, gtksourceview4
+, poetry-core
 , wrapGAppsHook
-, makeDesktopItem
-, copyDesktopItems
+, gtksourceview4
+, pango
 , gaphas
 , generic
+, jedi
 , pycairo
 , pygobject3
-, python
 , tinycss2
+, gtk3
+, librsvg
+, makeDesktopItem
+, python
 }:
 
 buildPythonApplication rec {
   pname = "gaphor";
-  version = "2.6.5";
+  version = "2.8.2";
 
   format = "pyproject";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-IFsbWx5lblKsnEibVihM6ZPRoydXC+JM1gdZEUUTKxw=";
+    sha256 = "sha256-+qqsSLjdY2I19fxdfkOEQ9DhTTHccUDll4O5yqtLiz0=";
   };
 
   nativeBuildInputs = [
-    poetry-core copyDesktopItems gobject-introspection wrapGAppsHook
+    copyDesktopItems
+    gobject-introspection
+    poetry-core
+    wrapGAppsHook
   ];
 
   # Setting gobject-introspection on booth nativeBuildInputs and
   # buildInputs because of #56943. This recognizes pango, avoiding
   # a "ValueError: Namespace PangoCairo not available".
-  buildInputs = [ gobject-introspection gtksourceview4 pango ];
+  buildInputs = [
+    gobject-introspection
+    gtksourceview4
+    pango
+  ];
 
   propagatedBuildInputs = [
     gaphas
     generic
+    jedi
     pycairo
     pygobject3
     tinycss2
@@ -52,10 +63,20 @@ buildPythonApplication rec {
     desktopName = "Gaphor";
   };
 
+  # We need to wrap it manually to resolve all icons
+  dontWrapGApps = true;
+
   postInstall = ''
     install -Dm644 $out/${python.sitePackages}/gaphor/ui/icons/hicolor/scalable/apps/org.gaphor.Gaphor.svg $out/share/pixmaps/gaphor.svg
   '';
 
+  preFixup = ''
+    wrapProgram $out/bin/gaphor \
+        ''${gappsWrapperArgs[@]} \
+        --prefix XDG_DATA_DIRS : "${gtk3}/share/gsettings-schemas/${gtk3.name}/" \
+        --set GDK_PIXBUF_MODULE_FILE "${librsvg.out}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache"
+  '';
+
   meta = with lib; {
     description = "Simple modeling tool written in Python";
     maintainers = with maintainers; [ wolfangaukang ];