about summary refs log tree commit diff
path: root/pkgs/applications/graphics
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/graphics')
-rw-r--r--pkgs/applications/graphics/ipe/default.nix33
-rw-r--r--pkgs/applications/graphics/ipe/headers-lookup.patch13
2 files changed, 33 insertions, 13 deletions
diff --git a/pkgs/applications/graphics/ipe/default.nix b/pkgs/applications/graphics/ipe/default.nix
index 045ac5d665cfe..c30bef90f3d1a 100644
--- a/pkgs/applications/graphics/ipe/default.nix
+++ b/pkgs/applications/graphics/ipe/default.nix
@@ -1,5 +1,5 @@
 { lib
-, mkDerivation
+, stdenv
 , makeDesktopItem
 , fetchurl
 , pkg-config
@@ -14,21 +14,24 @@
 , lua5
 , qtbase
 , texlive
+, wrapQtAppsHook
 , zlib
+, withTeXLive ? true
 }:
 
-mkDerivation rec {
+stdenv.mkDerivation rec {
   pname = "ipe";
-  version = "7.2.24";
+  version = "7.2.26";
 
   src = fetchurl {
     url = "https://github.com/otfried/ipe/releases/download/v${version}/ipe-${version}-src.tar.gz";
-    sha256 = "sha256-/rh58k0dziWRB5B3BEbVCwPkbuLr19KBV7FwWXFkT28=";
+    sha256 = "sha256-5J0AV5E6SlFrIBfwDZrbJnkDUoVZ0fDH669s2RQ1CqU=";
   };
+  patches = [
+    ./headers-lookup.patch
+  ];
 
-  sourceRoot = "${pname}-${version}/src";
-
-  nativeBuildInputs = [ pkg-config copyDesktopItems ];
+  nativeBuildInputs = [ pkg-config copyDesktopItems wrapQtAppsHook ];
 
   buildInputs = [
     cairo
@@ -40,15 +43,19 @@ mkDerivation rec {
     libspiro
     lua5
     qtbase
-    texlive
     zlib
-  ];
+  ] ++ (lib.optionals withTeXLive [
+    texlive
+  ]);
 
-  IPEPREFIX = placeholder "out";
-  URWFONTDIR = "${texlive}/texmf-dist/fonts/type1/urw/";
-  LUA_PACKAGE = "lua";
+  makeFlags = [
+    "-C src"
+    "IPEPREFIX=${placeholder "out"}"
+    "LUA_PACKAGE=lua"
+    "IPE_NO_SPELLCHECK=1" # qtSpell is not yet packaged
+  ];
 
-  qtWrapperArgs = [ "--prefix PATH : ${lib.makeBinPath [ texlive ]}" ];
+  qtWrapperArgs = lib.optional withTeXLive [ "--prefix PATH : ${lib.makeBinPath [ texlive ]}" ];
 
   enableParallelBuilding = true;
 
diff --git a/pkgs/applications/graphics/ipe/headers-lookup.patch b/pkgs/applications/graphics/ipe/headers-lookup.patch
new file mode 100644
index 0000000000000..a6adf1b164742
--- /dev/null
+++ b/pkgs/applications/graphics/ipe/headers-lookup.patch
@@ -0,0 +1,13 @@
+diff --git a/src/ipepresenter/Makefile b/src/ipepresenter/Makefile
+index ae3664e..f4f74ff 100644
+--- a/src/ipepresenter/Makefile
++++ b/src/ipepresenter/Makefile
+@@ -8,7 +8,7 @@ include ../common.mak
+ 
+ TARGET = $(call exe_target,ipepresenter)
+ 
+-CXXFLAGS += -I../include -I../ipecanvas -I../ipecairo \
++CPPFLAGS += -I../include -I../ipecanvas -I../ipecairo \
+ 	$(UI_CFLAGS) $(CAIRO_CFLAGS) $(ZLIB_CFLAGS)
+ LIBS += -L$(buildlib) -lipecanvas -lipecairo -lipe \
+ 	$(UI_LIBS) $(CAIRO_LIBS) $(ZLIB_LIBS)