diff options
author | Yannik Rödel <hey@yannik.info> | 2021-10-20 13:01:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-20 13:01:54 +0200 |
commit | 1c9842fa819c6b0ecf7508aa7bf9e46b45d72488 (patch) | |
tree | db024c3df16c9e87b507ccea9ad0a3eb9b83a778 /pkgs/applications/graphics/ipe | |
parent | 9369c6520bd69b1a2b8f2ff1449ff01f45411e0e (diff) |
ipe: add desktop file (#141879)
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
Diffstat (limited to 'pkgs/applications/graphics/ipe')
-rw-r--r-- | pkgs/applications/graphics/ipe/default.nix | 34 |
1 files changed, 28 insertions, 6 deletions
diff --git a/pkgs/applications/graphics/ipe/default.nix b/pkgs/applications/graphics/ipe/default.nix index 72c79d7dc5019..c454ed0422d17 100644 --- a/pkgs/applications/graphics/ipe/default.nix +++ b/pkgs/applications/graphics/ipe/default.nix @@ -1,7 +1,9 @@ { lib , mkDerivation +, makeDesktopItem , fetchurl , pkg-config +, copyDesktopItems , cairo , freetype , ghostscript @@ -26,7 +28,7 @@ mkDerivation rec { sourceRoot = "${pname}-${version}/src"; - nativeBuildInputs = [ pkg-config ]; + nativeBuildInputs = [ pkg-config copyDesktopItems ]; buildInputs = [ cairo @@ -42,19 +44,39 @@ mkDerivation rec { zlib ]; - IPEPREFIX=placeholder "out"; - URWFONTDIR="${texlive}/texmf-dist/fonts/type1/urw/"; + IPEPREFIX = placeholder "out"; + URWFONTDIR = "${texlive}/texmf-dist/fonts/type1/urw/"; LUA_PACKAGE = "lua"; - qtWrapperArgs = [ "--prefix PATH : ${texlive}/bin" ]; + qtWrapperArgs = [ "--prefix PATH : ${lib.makeBinPath [ texlive ]}" ]; enableParallelBuilding = true; - # TODO: make .desktop entry + desktopItems = [ + (makeDesktopItem { + name = pname; + desktopName = "Ipe"; + genericName = "Drawing editor"; + comment = "A drawing editor for creating figures in PDF format"; + exec = "ipe"; + icon = "ipe"; + mimeType = "text/xml;application/pdf"; + categories = "Graphics;Qt;"; + extraDesktopEntries = { + StartupWMClass = "ipe"; + StartupNotify = "true"; + }; + }) + ]; + + postInstall = '' + mkdir -p $out/share/icons/hicolor/128x128/apps + ln -s $out/share/ipe/${version}/icons/icon_128x128.png $out/share/icons/hicolor/128x128/apps/ipe.png + ''; meta = with lib; { description = "An editor for drawing figures"; - homepage = "http://ipe.otfried.org"; # https not available + homepage = "http://ipe.otfried.org"; # https not available license = licenses.gpl3Plus; longDescription = '' Ipe is an extensible drawing editor for creating figures in PDF and Postscript format. |