forked from mirrors/nixpkgs
Merge pull request #20558 from lverns/xournal-desktop-fix-pr
xournal: add desktop file and mime info
This commit is contained in:
commit
1e3fe4b0a4
|
@ -1,4 +1,4 @@
|
||||||
{ stdenv, fetchurl
|
{ stdenv, fetchurl, makeDesktopItem
|
||||||
, ghostscript, atk, gtk2, glib, fontconfig, freetype
|
, ghostscript, atk, gtk2, glib, fontconfig, freetype
|
||||||
, libgnomecanvas, libgnomeprint, libgnomeprintui
|
, libgnomecanvas, libgnomeprint, libgnomeprintui
|
||||||
, pango, libX11, xproto, zlib, poppler
|
, pango, libX11, xproto, zlib, poppler
|
||||||
|
@ -21,6 +21,32 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
NIX_LDFLAGS = [ "-lX11" "-lz" ];
|
NIX_LDFLAGS = [ "-lX11" "-lz" ];
|
||||||
|
|
||||||
|
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 = {
|
meta = {
|
||||||
homepage = http://xournal.sourceforge.net/;
|
homepage = http://xournal.sourceforge.net/;
|
||||||
description = "Note-taking application (supposes stylus)";
|
description = "Note-taking application (supposes stylus)";
|
||||||
|
|
Loading…
Reference in a new issue