2016-11-18 02:42:01 +00:00
|
|
|
{ stdenv, fetchurl, makeDesktopItem
|
2016-09-11 22:24:51 +01:00
|
|
|
, ghostscript, atk, gtk2, glib, fontconfig, freetype
|
2010-05-27 20:44:17 +01:00
|
|
|
, libgnomecanvas, libgnomeprint, libgnomeprintui
|
2016-08-18 13:22:33 +01:00
|
|
|
, pango, libX11, xproto, zlib, poppler
|
2010-05-27 20:44:17 +01:00
|
|
|
, autoconf, automake, libtool, pkgconfig}:
|
|
|
|
stdenv.mkDerivation rec {
|
2014-09-25 22:58:53 +01:00
|
|
|
version = "0.4.8";
|
2010-05-27 20:44:17 +01:00
|
|
|
name = "xournal-" + version;
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://sourceforge/xournal/${name}.tar.gz";
|
2014-09-25 22:58:53 +01:00
|
|
|
sha256 = "0c7gjcqhygiyp0ypaipdaxgkbivg6q45vhsj8v5jsi9nh6iqff13";
|
2010-05-27 20:44:17 +01:00
|
|
|
};
|
2009-08-02 22:47:10 +01:00
|
|
|
|
2010-05-27 20:44:17 +01:00
|
|
|
buildInputs = [
|
2016-09-11 22:24:51 +01:00
|
|
|
ghostscript atk gtk2 glib fontconfig freetype
|
2009-08-02 22:47:10 +01:00
|
|
|
libgnomecanvas libgnomeprint libgnomeprintui
|
2016-08-18 13:22:33 +01:00
|
|
|
pango libX11 xproto zlib poppler
|
2009-08-02 22:47:10 +01:00
|
|
|
];
|
|
|
|
|
2012-12-28 18:20:09 +00:00
|
|
|
nativeBuildInputs = [ autoconf automake libtool pkgconfig ];
|
2011-12-15 08:01:03 +00:00
|
|
|
|
2016-08-18 13:22:33 +01:00
|
|
|
NIX_LDFLAGS = [ "-lX11" "-lz" ];
|
2011-12-15 08:01:03 +00:00
|
|
|
|
2016-11-18 02:42:01 +00:00
|
|
|
desktopItem = makeDesktopItem {
|
|
|
|
name = name;
|
|
|
|
exec = "xournal";
|
|
|
|
icon = "xournal";
|
|
|
|
desktopName = "Xournal";
|
|
|
|
comment = meta.description;
|
|
|
|
categories = "Office;Graphics;";
|
|
|
|
mimeType = "application/pdf;application/x-xoj";
|
|
|
|
genericName = "PDF Editor";
|
|
|
|
};
|
|
|
|
|
|
|
|
postInstall=''
|
|
|
|
mkdir --parents $out/share/mime/packages
|
|
|
|
cat << EOF > $out/share/mime/packages/xournal.xml
|
|
|
|
<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
|
|
|
|
<mime-type type="application/x-xoj">
|
|
|
|
<comment>Xournal Document</comment>
|
|
|
|
<glob pattern="*.xoj"/>
|
|
|
|
</mime-type>
|
|
|
|
</mime-info>
|
|
|
|
EOF
|
|
|
|
cp --recursive ${desktopItem}/share/applications $out/share
|
|
|
|
mkdir --parents $out/share/icons
|
|
|
|
cp $out/share/xournal/pixmaps/xournal.png $out/share/icons
|
|
|
|
'';
|
|
|
|
|
2009-08-02 22:47:10 +01:00
|
|
|
meta = {
|
2011-12-15 08:01:03 +00:00
|
|
|
homepage = http://xournal.sourceforge.net/;
|
2016-06-20 11:53:46 +01:00
|
|
|
description = "Note-taking application (supposes stylus)";
|
2010-05-27 20:44:17 +01:00
|
|
|
maintainers = [ stdenv.lib.maintainers.guibert ];
|
2015-04-20 15:21:13 +01:00
|
|
|
license = stdenv.lib.licenses.gpl2;
|
2016-08-02 18:50:55 +01:00
|
|
|
platforms = stdenv.lib.platforms.linux;
|
2009-08-02 22:47:10 +01:00
|
|
|
};
|
|
|
|
}
|