nixpkgs/pkgs/applications/graphics/ipe/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

88 lines
1.9 KiB
Nix
Raw Normal View History

2021-02-07 18:58:32 +00:00
{ lib
, mkDerivation
, makeDesktopItem
2021-02-07 18:58:32 +00:00
, fetchurl
, pkg-config
, copyDesktopItems
2021-02-07 18:58:32 +00:00
, cairo
, freetype
, ghostscript
, gsl
, libjpeg
, libpng
, libspiro
, lua5
, qtbase
, texlive
, zlib
2015-12-12 16:57:38 +00:00
}:
mkDerivation rec {
2021-02-07 18:58:32 +00:00
pname = "ipe";
2022-06-19 12:27:50 +00:00
version = "7.2.24";
src = fetchurl {
2022-06-19 12:27:50 +00:00
url = "https://github.com/otfried/ipe/releases/download/v${version}/ipe-${version}-src.tar.gz";
sha256 = "sha256-/rh58k0dziWRB5B3BEbVCwPkbuLr19KBV7FwWXFkT28=";
};
2021-02-07 18:58:32 +00:00
sourceRoot = "${pname}-${version}/src";
2017-02-28 13:38:57 +00:00
nativeBuildInputs = [ pkg-config copyDesktopItems ];
buildInputs = [
2021-02-07 18:58:32 +00:00
cairo
freetype
ghostscript
gsl
libjpeg
libpng
libspiro
lua5
qtbase
texlive
zlib
];
IPEPREFIX = placeholder "out";
URWFONTDIR = "${texlive}/texmf-dist/fonts/type1/urw/";
2021-02-07 18:58:32 +00:00
LUA_PACKAGE = "lua";
2015-12-12 16:57:38 +00:00
qtWrapperArgs = [ "--prefix PATH : ${lib.makeBinPath [ texlive ]}" ];
enableParallelBuilding = true;
desktopItems = [
(makeDesktopItem {
name = pname;
desktopName = "Ipe";
genericName = "Drawing editor";
comment = "A drawing editor for creating figures in PDF format";
exec = "ipe";
icon = "ipe";
mimeTypes = [ "text/xml" "application/pdf" ];
categories = [ "Graphics" "Qt" ];
startupNotify = true;
startupWMClass = "ipe";
})
];
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
'';
2021-02-07 18:58:32 +00:00
meta = with lib; {
description = "An editor for drawing figures";
homepage = "http://ipe.otfried.org"; # https not available
2021-02-07 18:58:32 +00:00
license = licenses.gpl3Plus;
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-07 18:58:32 +00:00
maintainers = with maintainers; [ ttuegel ];
platforms = platforms.linux;
};
}