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

56 lines
1.5 KiB
Nix
Raw Normal View History

2017-05-17 22:26:11 +03:00
{ stdenv, fetchurl, makeWrapper, pkgconfig, zlib, freetype, cairo, lua5, texlive, ghostscript
2015-12-07 14:50:02 +03:00
, libjpeg, qtbase
2015-12-12 19:57:38 +03:00
}:
stdenv.mkDerivation rec {
name = "ipe-7.2.9";
src = fetchurl {
2017-12-01 15:11:20 +03:00
url = "https://dl.bintray.com/otfried/generic/ipe/7.2/${name}-src.tar.gz";
sha256 = "1i0h0q32xvbb0d3y2ff76jxnaw05hjf2z5gzww886z8arxwar1xn";
};
# changes taken from Gentoo portage
preConfigure = ''
cd src
sed -i \
-e 's/fpic/fPIC/' \
-e 's/moc-qt4/moc/' \
config.mak || die
sed -i -e 's/install -s/install/' common.mak || die
'';
2017-02-28 16:38:57 +03:00
NIX_CFLAGS_COMPILE = [ "-std=c++11" ]; # build with Qt 5.7
IPEPREFIX="$$out";
2015-12-12 19:57:38 +03:00
URWFONTDIR="${texlive}/texmf-dist/fonts/type1/urw/";
2015-08-15 06:30:21 +03:00
LUA_PACKAGE = "lua";
buildInputs = [
2017-05-17 22:26:11 +03:00
libjpeg zlib qtbase freetype cairo lua5 texlive ghostscript
];
2017-05-17 22:26:11 +03:00
nativeBuildInputs = [ makeWrapper pkgconfig ];
2015-12-12 19:57:38 +03:00
postFixup = ''
for prog in $out/bin/*; do
2017-05-17 22:26:11 +03:00
wrapProgram "$prog" --prefix PATH : "${texlive}/bin"
done
'';
#TODO: make .desktop entry
meta = {
description = "An editor for drawing figures";
2015-08-15 06:28:23 +03:00
homepage = http://ipe.otfried.org;
license = stdenv.lib.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.
'';
2015-08-15 06:28:42 +03:00
maintainers = [ stdenv.lib.maintainers.ttuegel ];
2015-08-15 06:28:51 +03:00
platforms = stdenv.lib.platforms.linux;
};
}