2016-11-18 03:42:01 +01:00
|
|
|
{ stdenv, fetchurl, makeDesktopItem
|
2016-09-11 23:24:51 +02:00
|
|
|
, ghostscript, atk, gtk2, glib, fontconfig, freetype
|
2010-05-27 21:44:17 +02:00
|
|
|
, libgnomecanvas, libgnomeprint, libgnomeprintui
|
2018-12-31 04:40:47 +01:00
|
|
|
, pango, libX11, xorgproto, zlib, poppler
|
2010-05-27 21:44:17 +02:00
|
|
|
, autoconf, automake, libtool, pkgconfig}:
|
2016-12-25 02:45:01 +01:00
|
|
|
|
|
|
|
let
|
|
|
|
isGdkQuartzBackend = (gtk2.gdktarget == "quartz");
|
|
|
|
in
|
|
|
|
|
2010-05-27 21:44:17 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2017-09-04 05:53:35 +02:00
|
|
|
version = "0.4.8.2016";
|
2010-05-27 21:44:17 +02:00
|
|
|
name = "xournal-" + version;
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://sourceforge/xournal/${name}.tar.gz";
|
2017-09-04 05:53:35 +02:00
|
|
|
sha256 = "09i88v3wacmx7f96dmq0l3afpyv95lh6jrx16xzm0jd1szdrhn5j";
|
2010-05-27 21:44:17 +02:00
|
|
|
};
|
2009-08-02 23:47:10 +02:00
|
|
|
|
2010-05-27 21:44:17 +02:00
|
|
|
buildInputs = [
|
2016-09-11 23:24:51 +02:00
|
|
|
ghostscript atk gtk2 glib fontconfig freetype
|
2016-12-25 01:22:31 +01:00
|
|
|
libgnomecanvas
|
2018-12-31 04:40:47 +01:00
|
|
|
pango libX11 xorgproto zlib poppler
|
2016-12-25 01:22:31 +01:00
|
|
|
] ++ stdenv.lib.optionals (!stdenv.isDarwin) [
|
|
|
|
libgnomeprint libgnomeprintui
|
2009-08-02 23:47:10 +02:00
|
|
|
];
|
|
|
|
|
2012-12-28 19:20:09 +01:00
|
|
|
nativeBuildInputs = [ autoconf automake libtool pkgconfig ];
|
2011-12-15 09:01:03 +01:00
|
|
|
|
2016-12-25 02:45:01 +01:00
|
|
|
NIX_LDFLAGS = [ "-lz" ]
|
|
|
|
++ stdenv.lib.optionals (!isGdkQuartzBackend) [ "-lX11" ];
|
2011-12-15 09:01:03 +01:00
|
|
|
|
2016-11-18 03:42:01 +01: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
|
|
|
|
'';
|
|
|
|
|
2016-12-25 01:22:31 +01:00
|
|
|
meta = with stdenv.lib; {
|
2011-12-15 09:01:03 +01:00
|
|
|
homepage = http://xournal.sourceforge.net/;
|
2016-06-20 12:53:46 +02:00
|
|
|
description = "Note-taking application (supposes stylus)";
|
2016-12-25 01:22:31 +01:00
|
|
|
maintainers = [ maintainers.guibert ];
|
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = with platforms; linux ++ darwin;
|
2009-08-02 23:47:10 +02:00
|
|
|
};
|
|
|
|
}
|