1 { lib, stdenv, fetchurl, makeDesktopItem
2 , ghostscript, atk, gtk2, glib, fontconfig, freetype
4 , pango, libX11, xorgproto, zlib, poppler
5 , autoconf, automake, libtool, pkg-config}:
8 isGdkQuartzBackend = (gtk2.gdktarget == "quartz");
11 stdenv.mkDerivation rec {
12 version = "0.4.8.2016";
15 url = "mirror://sourceforge/xournal/xournal-${version}.tar.gz";
16 sha256 = "09i88v3wacmx7f96dmq0l3afpyv95lh6jrx16xzm0jd1szdrhn5j";
20 ghostscript atk gtk2 glib fontconfig freetype
22 pango libX11 xorgproto zlib poppler
25 nativeBuildInputs = [ autoconf automake libtool pkg-config ];
28 + lib.optionalString (!isGdkQuartzBackend) " -lX11";
30 desktopItem = makeDesktopItem {
31 name = "xournal-${version}";
34 desktopName = "Xournal";
35 comment = meta.description;
36 categories = [ "Office" "Graphics" ];
37 mimeTypes = [ "application/pdf" "application/x-xoj" ];
38 genericName = "PDF Editor";
42 mkdir --parents $out/share/mime/packages
43 cat << EOF > $out/share/mime/packages/xournal.xml
44 <mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
45 <mime-type type="application/x-xoj">
46 <comment>Xournal Document</comment>
47 <glob pattern="*.xoj"/>
51 cp --recursive ${desktopItem}/share/applications $out/share
52 mkdir --parents $out/share/icons
53 cp $out/share/xournal/pixmaps/xournal.png $out/share/icons
57 homepage = "https://xournal.sourceforge.net/";
58 description = "Note-taking application (supposes stylus)";
59 maintainers = [ maintainers.guibert ];
60 license = licenses.gpl2;
61 platforms = with platforms; linux ++ darwin;
62 mainProgram = "xournal";