2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchurl, makeDesktopItem
|
2016-09-11 21:24:51 +00:00
|
|
|
, ghostscript, atk, gtk2, glib, fontconfig, freetype
|
2010-05-27 19:44:17 +00:00
|
|
|
, libgnomecanvas, libgnomeprint, libgnomeprintui
|
2018-12-31 03:40:47 +00:00
|
|
|
, pango, libX11, xorgproto, zlib, poppler
|
2021-01-19 06:50:56 +00:00
|
|
|
, autoconf, automake, libtool, pkg-config}:
|
2016-12-25 01:45:01 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
isGdkQuartzBackend = (gtk2.gdktarget == "quartz");
|
|
|
|
in
|
|
|
|
|
2010-05-27 19:44:17 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2017-09-04 03:53:35 +00:00
|
|
|
version = "0.4.8.2016";
|
2022-03-07 11:37:20 +00:00
|
|
|
pname = "xournal";
|
2010-05-27 19:44:17 +00:00
|
|
|
src = fetchurl {
|
2022-03-07 11:37:20 +00:00
|
|
|
url = "mirror://sourceforge/xournal/xournal-${version}.tar.gz";
|
2017-09-04 03:53:35 +00:00
|
|
|
sha256 = "09i88v3wacmx7f96dmq0l3afpyv95lh6jrx16xzm0jd1szdrhn5j";
|
2010-05-27 19:44:17 +00:00
|
|
|
};
|
2009-08-02 21:47:10 +00:00
|
|
|
|
2010-05-27 19:44:17 +00:00
|
|
|
buildInputs = [
|
2016-09-11 21:24:51 +00:00
|
|
|
ghostscript atk gtk2 glib fontconfig freetype
|
2016-12-25 00:22:31 +00:00
|
|
|
libgnomecanvas
|
2018-12-31 03:40:47 +00:00
|
|
|
pango libX11 xorgproto zlib poppler
|
2021-01-15 13:21:58 +00:00
|
|
|
] ++ lib.optionals (!stdenv.isDarwin) [
|
2016-12-25 00:22:31 +00:00
|
|
|
libgnomeprint libgnomeprintui
|
2009-08-02 21:47:10 +00:00
|
|
|
];
|
|
|
|
|
2021-01-19 06:50:56 +00:00
|
|
|
nativeBuildInputs = [ autoconf automake libtool pkg-config ];
|
2011-12-15 08:01:03 +00:00
|
|
|
|
2019-10-30 11:34:47 +00:00
|
|
|
NIX_LDFLAGS = "-lz"
|
2021-01-15 13:21:58 +00:00
|
|
|
+ lib.optionalString (!isGdkQuartzBackend) " -lX11";
|
2011-12-15 08:01:03 +00:00
|
|
|
|
2016-11-18 02:42:01 +00:00
|
|
|
desktopItem = makeDesktopItem {
|
2022-03-07 11:37:20 +00:00
|
|
|
name = "xournal-${version}";
|
2016-11-18 02:42:01 +00:00
|
|
|
exec = "xournal";
|
|
|
|
icon = "xournal";
|
|
|
|
desktopName = "Xournal";
|
|
|
|
comment = meta.description;
|
2022-02-22 14:56:15 +00:00
|
|
|
categories = [ "Office" "Graphics" ];
|
|
|
|
mimeTypes = [ "application/pdf" "application/x-xoj" ];
|
2016-11-18 02:42:01 +00:00
|
|
|
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
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "http://xournal.sourceforge.net/";
|
2016-06-20 10:53:46 +00:00
|
|
|
description = "Note-taking application (supposes stylus)";
|
2016-12-25 00:22:31 +00:00
|
|
|
maintainers = [ maintainers.guibert ];
|
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = with platforms; linux ++ darwin;
|
2009-08-02 21:47:10 +00:00
|
|
|
};
|
|
|
|
}
|