nixpkgs-suyu/pkgs/applications/graphics/xournal/default.nix

66 lines
1.9 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl, makeDesktopItem
, ghostscript, atk, gtk2, glib, fontconfig, freetype
, libgnomecanvas, libgnomeprint, libgnomeprintui
, pango, libX11, xorgproto, zlib, poppler
, autoconf, automake, libtool, pkgconfig}:
let
isGdkQuartzBackend = (gtk2.gdktarget == "quartz");
in
stdenv.mkDerivation rec {
xournal: 0.4.8 -> 0.4.8.2016 Upstream bug fixes: * pen and touchscreen input handling bugfixes * fix a minor bug with save file paths in Windows (D. German) * use GDK macros (not WIN32) to disable X11-specific code (T. Schoonjans) * export to PDF and printing: fix resolution loss on some pdf backgrounds * disable xinput during modal dialog boxes * avoid data corruption when exporting to overwrite a PDF * fix path search order for toolbar bitmaps * text and image tools activate on button release instead of button press to avoid subsequent confusion between clicks in toolbar and drawing area * fix "pen disable touch" when touchscreen sends prox events (A. Kittenberger) * fix crash when pasting text or images via xclip * updated Italian translation (Marco Ciampa) New upstream features: * add space and shift-space bindings to page down/up (D. German) * add A5 paper (D. German) * config option to export successive layers to separate PDF pages * config option to create new file when trying to open non-existent .xoj The full change log along with bug numbers can be found at: https://sourceforge.net/p/xournal/code/ci/Release-0_4_8_2016/tree/ChangeLog I've dropped gdk-quartz-backend.patch, because I believe it has been fixed upstream. Here are the upstream changes relevant for the patch (shortened, because SourceForge has really long URLs): http://bit.ly/2vXW8n0 -> src/Makefile.am http://bit.ly/2gDnjl7 -> src/xo-file.c http://bit.ly/2xJ5K7A -> src/xo-misc.c Tested building and using the application. Signed-off-by: aszlig <aszlig@redmoonstudios.org> Cc: @7c6f434c, @dguibert Cc: @johbo who has introduced the patch in #21842
2017-09-04 05:53:35 +02:00
version = "0.4.8.2016";
name = "xournal-" + version;
src = fetchurl {
url = "mirror://sourceforge/xournal/${name}.tar.gz";
xournal: 0.4.8 -> 0.4.8.2016 Upstream bug fixes: * pen and touchscreen input handling bugfixes * fix a minor bug with save file paths in Windows (D. German) * use GDK macros (not WIN32) to disable X11-specific code (T. Schoonjans) * export to PDF and printing: fix resolution loss on some pdf backgrounds * disable xinput during modal dialog boxes * avoid data corruption when exporting to overwrite a PDF * fix path search order for toolbar bitmaps * text and image tools activate on button release instead of button press to avoid subsequent confusion between clicks in toolbar and drawing area * fix "pen disable touch" when touchscreen sends prox events (A. Kittenberger) * fix crash when pasting text or images via xclip * updated Italian translation (Marco Ciampa) New upstream features: * add space and shift-space bindings to page down/up (D. German) * add A5 paper (D. German) * config option to export successive layers to separate PDF pages * config option to create new file when trying to open non-existent .xoj The full change log along with bug numbers can be found at: https://sourceforge.net/p/xournal/code/ci/Release-0_4_8_2016/tree/ChangeLog I've dropped gdk-quartz-backend.patch, because I believe it has been fixed upstream. Here are the upstream changes relevant for the patch (shortened, because SourceForge has really long URLs): http://bit.ly/2vXW8n0 -> src/Makefile.am http://bit.ly/2gDnjl7 -> src/xo-file.c http://bit.ly/2xJ5K7A -> src/xo-misc.c Tested building and using the application. Signed-off-by: aszlig <aszlig@redmoonstudios.org> Cc: @7c6f434c, @dguibert Cc: @johbo who has introduced the patch in #21842
2017-09-04 05:53:35 +02:00
sha256 = "09i88v3wacmx7f96dmq0l3afpyv95lh6jrx16xzm0jd1szdrhn5j";
};
buildInputs = [
ghostscript atk gtk2 glib fontconfig freetype
libgnomecanvas
pango libX11 xorgproto zlib poppler
] ++ stdenv.lib.optionals (!stdenv.isDarwin) [
libgnomeprint libgnomeprintui
];
nativeBuildInputs = [ autoconf automake libtool pkgconfig ];
NIX_LDFLAGS = [ "-lz" ]
++ stdenv.lib.optionals (!isGdkQuartzBackend) [ "-lX11" ];
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
'';
meta = with stdenv.lib; {
homepage = http://xournal.sourceforge.net/;
description = "Note-taking application (supposes stylus)";
maintainers = [ maintainers.guibert ];
license = licenses.gpl2;
platforms = with platforms; linux ++ darwin;
};
}