2021-02-13 14:23:35 +00:00
|
|
|
{ lib
|
2023-04-29 16:46:19 +00:00
|
|
|
, stdenv
|
2021-10-17 09:34:42 +00:00
|
|
|
, makeDesktopItem
|
2021-02-13 14:23:35 +00:00
|
|
|
, fetchurl
|
|
|
|
, pkg-config
|
2021-10-17 09:34:42 +00:00
|
|
|
, copyDesktopItems
|
2021-02-13 14:23:35 +00:00
|
|
|
, cairo
|
|
|
|
, freetype
|
|
|
|
, ghostscript
|
|
|
|
, gsl
|
|
|
|
, libjpeg
|
|
|
|
, libpng
|
|
|
|
, libspiro
|
|
|
|
, lua5
|
|
|
|
, qtbase
|
2023-11-16 04:20:00 +00:00
|
|
|
, texliveSmall
|
2023-04-29 16:46:19 +00:00
|
|
|
, wrapQtAppsHook
|
2021-02-13 14:23:35 +00:00
|
|
|
, zlib
|
2023-04-29 16:46:19 +00:00
|
|
|
, withTeXLive ? true
|
2023-08-04 22:07:22 +00:00
|
|
|
, buildPackages
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
2023-04-29 16:46:19 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2021-02-13 14:23:35 +00:00
|
|
|
pname = "ipe";
|
2023-08-04 22:07:22 +00:00
|
|
|
version = "7.2.27";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2022-06-26 10:26:21 +00:00
|
|
|
url = "https://github.com/otfried/ipe/releases/download/v${version}/ipe-${version}-src.tar.gz";
|
2023-08-04 22:07:22 +00:00
|
|
|
sha256 = "sha256-wx/bZy8kB7dpZsz58BeRGdS1BzbrIoafgEmLyFg7wZU=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-04-29 16:46:19 +00:00
|
|
|
nativeBuildInputs = [ pkg-config copyDesktopItems wrapQtAppsHook ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildInputs = [
|
2021-02-13 14:23:35 +00:00
|
|
|
cairo
|
|
|
|
freetype
|
|
|
|
ghostscript
|
|
|
|
gsl
|
|
|
|
libjpeg
|
|
|
|
libpng
|
|
|
|
libspiro
|
|
|
|
lua5
|
|
|
|
qtbase
|
|
|
|
zlib
|
2023-04-29 16:46:19 +00:00
|
|
|
] ++ (lib.optionals withTeXLive [
|
2023-11-16 04:20:00 +00:00
|
|
|
texliveSmall
|
2023-04-29 16:46:19 +00:00
|
|
|
]);
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-04-29 16:46:19 +00:00
|
|
|
makeFlags = [
|
|
|
|
"-C src"
|
|
|
|
"IPEPREFIX=${placeholder "out"}"
|
|
|
|
"LUA_PACKAGE=lua"
|
2023-08-04 22:07:22 +00:00
|
|
|
"MOC=${buildPackages.qt6Packages.qtbase}/libexec/moc"
|
2023-04-29 16:46:19 +00:00
|
|
|
"IPE_NO_SPELLCHECK=1" # qtSpell is not yet packaged
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
qtWrapperArgs = lib.optionals withTeXLive [ "--prefix PATH : ${lib.makeBinPath [ texliveSmall ]}" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2021-10-17 09:34:42 +00:00
|
|
|
desktopItems = [
|
|
|
|
(makeDesktopItem {
|
|
|
|
name = pname;
|
|
|
|
desktopName = "Ipe";
|
|
|
|
genericName = "Drawing editor";
|
|
|
|
comment = "A drawing editor for creating figures in PDF format";
|
|
|
|
exec = "ipe";
|
|
|
|
icon = "ipe";
|
2022-03-05 16:20:37 +00:00
|
|
|
mimeTypes = [ "text/xml" "application/pdf" ];
|
|
|
|
categories = [ "Graphics" "Qt" ];
|
|
|
|
startupNotify = true;
|
|
|
|
startupWMClass = "ipe";
|
2021-10-17 09:34:42 +00:00
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/share/icons/hicolor/128x128/apps
|
|
|
|
ln -s $out/share/ipe/${version}/icons/icon_128x128.png $out/share/icons/hicolor/128x128/apps/ipe.png
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-13 14:23:35 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "An editor for drawing figures";
|
2021-10-17 09:34:42 +00:00
|
|
|
homepage = "http://ipe.otfried.org"; # https not available
|
2021-02-13 14:23:35 +00:00
|
|
|
license = licenses.gpl3Plus;
|
2020-04-24 23:36:52 +00:00
|
|
|
longDescription = ''
|
|
|
|
Ipe is an extensible drawing editor for creating figures in PDF and Postscript format.
|
|
|
|
It supports making small figures for inclusion into LaTeX-documents
|
|
|
|
as well as presentations in PDF.
|
|
|
|
'';
|
2021-02-13 14:23:35 +00:00
|
|
|
maintainers = with maintainers; [ ttuegel ];
|
|
|
|
platforms = platforms.linux;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|