2016-08-17 10:41:34 +00:00
|
|
|
{ stdenv, python3Packages, fetchFromGitHub, makeWrapper, makeDesktopItem }:
|
2015-11-20 12:48:30 +00:00
|
|
|
|
2016-08-17 10:41:34 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2015-07-13 07:20:43 +00:00
|
|
|
name = "leo-editor-${version}";
|
2017-04-02 01:58:13 +00:00
|
|
|
version = "5.5";
|
2015-07-13 07:20:43 +00:00
|
|
|
|
2016-08-17 10:41:34 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "leo-editor";
|
|
|
|
repo = "leo-editor";
|
|
|
|
rev = version;
|
2017-04-02 01:58:13 +00:00
|
|
|
sha256 = "0crzljirzfiy9xn02ydd23clmd8bzdjxkyxdqsvdkgfy9j41b8hr";
|
2015-07-13 07:20:43 +00:00
|
|
|
};
|
|
|
|
|
2016-08-17 10:41:34 +00:00
|
|
|
dontBuild = true;
|
2015-07-13 07:20:43 +00:00
|
|
|
|
2017-04-02 01:58:13 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper python3Packages.python ];
|
2016-08-17 10:41:34 +00:00
|
|
|
propagatedBuildInputs = with python3Packages; [ pyqt5 ];
|
2015-11-20 21:17:16 +00:00
|
|
|
|
2016-08-17 10:41:34 +00:00
|
|
|
desktopItem = makeDesktopItem rec {
|
|
|
|
name = "leo-editor";
|
|
|
|
exec = "leo %U";
|
|
|
|
icon = "leoapp32";
|
|
|
|
type = "Application";
|
|
|
|
comment = meta.description;
|
|
|
|
desktopName = "Leo";
|
|
|
|
genericName = "Text Editor";
|
|
|
|
categories = stdenv.lib.concatStringsSep ";" [
|
|
|
|
"Application" "Development" "IDE" "QT"
|
|
|
|
];
|
|
|
|
startupNotify = "false";
|
|
|
|
mimeType = stdenv.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"
|
|
|
|
"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
|
|
|
|
|
|
|
|
makeWrapper ${python3Packages.python}/bin/python3.5m $out/bin/leo \
|
|
|
|
--set PYTHONPATH "$PYTHONPATH:$out/share/leo-editor" \
|
|
|
|
--add-flags "-O $out/share/leo-editor/launchLeo.py"
|
2015-11-20 21:17:16 +00:00
|
|
|
'';
|
|
|
|
|
2016-08-17 10:41:34 +00:00
|
|
|
meta = with stdenv.lib; {
|
2017-04-02 01:58:13 +00:00
|
|
|
homepage = http://leoeditor.com;
|
2015-07-13 07:20:43 +00: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 01:58:13 +00:00
|
|
|
license = licenses.mit;
|
2016-08-17 10:41:34 +00:00
|
|
|
maintainers = with maintainers; [ leonardoce ramkromberg ];
|
2015-07-13 07:20:43 +00:00
|
|
|
};
|
|
|
|
}
|