summary refs log tree commit diff
path: root/pkgs/applications/editors/leo-editor
diff options
context:
space:
mode:
authorJonathan Ringer <jonringer117@gmail.com>2020-04-09 10:25:18 -0700
committerJon <jonringer@users.noreply.github.com>2020-04-09 10:47:54 -0700
commite8f668185e472cc1264f338eb3dddefa19e06523 (patch)
tree1031f87d1b0df3793e6dcf045f0e6464c5c3c3d5 /pkgs/applications/editors/leo-editor
parent8f86e3c1a3d6de7a4a6b12fc74c48958d425aade (diff)
downloadnixpkgs-e8f668185e472cc1264f338eb3dddefa19e06523.tar
nixpkgs-e8f668185e472cc1264f338eb3dddefa19e06523.tar.gz
nixpkgs-e8f668185e472cc1264f338eb3dddefa19e06523.tar.bz2
nixpkgs-e8f668185e472cc1264f338eb3dddefa19e06523.tar.lz
nixpkgs-e8f668185e472cc1264f338eb3dddefa19e06523.tar.xz
nixpkgs-e8f668185e472cc1264f338eb3dddefa19e06523.tar.zst
nixpkgs-e8f668185e472cc1264f338eb3dddefa19e06523.zip
leo-editor: add qt support
Diffstat (limited to 'pkgs/applications/editors/leo-editor')
-rw-r--r--pkgs/applications/editors/leo-editor/default.nix14
1 files changed, 8 insertions, 6 deletions
diff --git a/pkgs/applications/editors/leo-editor/default.nix b/pkgs/applications/editors/leo-editor/default.nix
index 40fe3de6865..971829ab31d 100644
--- a/pkgs/applications/editors/leo-editor/default.nix
+++ b/pkgs/applications/editors/leo-editor/default.nix
@@ -1,6 +1,6 @@
-{ stdenv, python3, fetchFromGitHub, makeWrapper, makeDesktopItem }:
+{ lib, mkDerivation, python3, fetchFromGitHub, makeWrapper, wrapQtAppsHook, makeDesktopItem }:
 
-stdenv.mkDerivation rec {
+mkDerivation rec {
   pname = "leo-editor";
   version = "6.2";
 
@@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
 
   dontBuild = true;
 
-  nativeBuildInputs = [ makeWrapper python3 ];
+  nativeBuildInputs = [ wrapQtAppsHook makeWrapper python3 ];
   propagatedBuildInputs = with python3.pkgs; [ pyqt5 docutils ];
 
   desktopItem = makeDesktopItem {
@@ -24,11 +24,11 @@ stdenv.mkDerivation rec {
     comment = meta.description;
     desktopName = "Leo";
     genericName = "Text Editor";
-    categories = stdenv.lib.concatStringsSep ";" [
+    categories = lib.concatStringsSep ";" [
       "Application" "Development" "IDE" "QT"
     ];
     startupNotify = "false";
-    mimeType = stdenv.lib.concatStringsSep ";" [
+    mimeType = lib.concatStringsSep ";" [
       "text/plain" "text/asp" "text/x-c" "text/x-script.elisp" "text/x-fortran"
       "text/html" "application/inf" "text/x-java-source" "application/x-javascript"
       "application/javascript" "text/ecmascript" "application/x-ksh" "text/x-script.ksh"
@@ -53,9 +53,11 @@ stdenv.mkDerivation rec {
     makeWrapper ${python3.interpreter} $out/bin/leo \
       --set PYTHONPATH "$PYTHONPATH:$out/share/leo-editor" \
       --add-flags "-O $out/share/leo-editor/launchLeo.py"
+
+    wrapQtApp $out/bin/leo
   '';
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "http://leoeditor.com";
     description = "A powerful folding editor";
     longDescription = "Leo is a PIM, IDE and outliner that accelerates the work flow of programmers, authors and web designers.";