2020-04-09 18:25:18 +01:00
|
|
|
{ lib, mkDerivation, python3, fetchFromGitHub, makeWrapper, wrapQtAppsHook, makeDesktopItem }:
|
2015-11-20 12:48:30 +00:00
|
|
|
|
2020-04-09 18:25:18 +01:00
|
|
|
mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "leo-editor";
|
2020-05-02 14:43:58 +01:00
|
|
|
version = "6.2.1";
|
2015-07-13 08:20:43 +01:00
|
|
|
|
2016-08-17 11:41:34 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "leo-editor";
|
|
|
|
repo = "leo-editor";
|
|
|
|
rev = version;
|
2020-05-02 14:43:58 +01:00
|
|
|
sha256 = "1s9jvxwzsl32clp78g92nq9p2byf08libr5widl1jnkv1cpkbvh9";
|
2015-07-13 08:20:43 +01:00
|
|
|
};
|
|
|
|
|
2016-08-17 11:41:34 +01:00
|
|
|
dontBuild = true;
|
2015-07-13 08:20:43 +01:00
|
|
|
|
2020-04-09 18:25:18 +01:00
|
|
|
nativeBuildInputs = [ wrapQtAppsHook makeWrapper python3 ];
|
2018-09-13 11:17:45 +01:00
|
|
|
propagatedBuildInputs = with python3.pkgs; [ pyqt5 docutils ];
|
2015-11-20 21:17:16 +00:00
|
|
|
|
2019-08-13 22:52:01 +01:00
|
|
|
desktopItem = makeDesktopItem {
|
2016-08-17 11:41:34 +01:00
|
|
|
name = "leo-editor";
|
|
|
|
exec = "leo %U";
|
|
|
|
icon = "leoapp32";
|
|
|
|
type = "Application";
|
|
|
|
comment = meta.description;
|
|
|
|
desktopName = "Leo";
|
|
|
|
genericName = "Text Editor";
|
2020-04-09 18:25:18 +01:00
|
|
|
categories = lib.concatStringsSep ";" [
|
2020-04-09 18:32:40 +01:00
|
|
|
"Application" "Development" "IDE"
|
2016-08-17 11:41:34 +01:00
|
|
|
];
|
|
|
|
startupNotify = "false";
|
2020-04-09 18:25:18 +01:00
|
|
|
mimeType = lib.concatStringsSep ";" [
|
2016-08-17 11:41:34 +01:00
|
|
|
"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"
|
|
|
|
"application/x-tex" "text/x-script.rexx" "text/x-pascal" "text/x-script.perl"
|
|
|
|
"application/postscript" "text/x-script.scheme" "text/x-script.guile" "text/sgml"
|
|
|
|
"text/x-sgml" "application/x-bsh" "application/x-sh" "application/x-shar"
|
|
|
|
"text/x-script.sh" "application/x-tcl" "text/x-script.tcl" "application/x-texinfo"
|
|
|
|
"application/xml" "text/xml" "text/x-asm"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p "$out/share/icons/hicolor/32x32/apps"
|
|
|
|
cp leo/Icons/leoapp32.png "$out/share/icons/hicolor/32x32/apps"
|
|
|
|
|
|
|
|
mkdir -p "$out/share/applications"
|
|
|
|
cp $desktopItem/share/applications/* $out/share/applications
|
|
|
|
|
|
|
|
mkdir -p $out/share/leo-editor
|
|
|
|
mv * $out/share/leo-editor
|
|
|
|
|
2018-02-18 22:24:59 +00:00
|
|
|
makeWrapper ${python3.interpreter} $out/bin/leo \
|
2016-08-17 11:41:34 +01:00
|
|
|
--set PYTHONPATH "$PYTHONPATH:$out/share/leo-editor" \
|
|
|
|
--add-flags "-O $out/share/leo-editor/launchLeo.py"
|
2020-04-09 18:25:18 +01:00
|
|
|
|
|
|
|
wrapQtApp $out/bin/leo
|
2015-11-20 21:17:16 +00:00
|
|
|
'';
|
|
|
|
|
2020-04-09 18:25:18 +01:00
|
|
|
meta = with lib; {
|
2020-03-29 05:23:50 +01:00
|
|
|
homepage = "http://leoeditor.com";
|
2015-07-13 08:20:43 +01:00
|
|
|
description = "A powerful folding editor";
|
|
|
|
longDescription = "Leo is a PIM, IDE and outliner that accelerates the work flow of programmers, authors and web designers.";
|
2017-04-02 02:58:13 +01:00
|
|
|
license = licenses.mit;
|
2020-11-23 22:27:32 +00:00
|
|
|
maintainers = with maintainers; [ leonardoce ];
|
2015-07-13 08:20:43 +01:00
|
|
|
};
|
|
|
|
}
|