about summary refs log tree commit diff
path: root/pkgs/applications/graphics/ipe
diff options
context:
space:
mode:
authorHenri Menke <henri@henrimenke.de>2023-04-07 15:15:25 +0200
committerHenri Menke <henri@henrimenke.de>2023-04-17 11:54:33 +0200
commit05564ceca772fce89070d81aaf3b9452d2dc86da (patch)
tree8b3038251506b70f34904b049bb940d7fd21256e /pkgs/applications/graphics/ipe
parent3a9113fb9d11f6c35ed2e755fb170eabbf00f317 (diff)
ipe: 7.2.24 -> 7.2.26
This also introduces a new option to make TeX Live optional. Ipe tries to find
LaTeX executables in PATH and some users might prefer to use their existing TeX
Live installation.
Diffstat (limited to 'pkgs/applications/graphics/ipe')
-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)