leo-editor: cleanup

This commit is contained in:
Sigmanificient 2025-08-07 23:05:58 +02:00
parent 891601dbde
commit 5306cc2bb9

View File

@ -8,15 +8,15 @@
libsForQt5, libsForQt5,
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation (finalAttrs: {
pname = "leo-editor"; pname = "leo-editor";
version = "6.8.6.1"; version = "6.8.6.1";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "leo-editor"; owner = "leo-editor";
repo = "leo-editor"; repo = "leo-editor";
rev = version; tag = "v${finalAttrs.version}";
sha256 = "sha256-3ojiIjsGJpPgVSUi0QhIddqwsDxfRWxhxAQ5YmzwZiQ="; hash = "sha256-3ojiIjsGJpPgVSUi0QhIddqwsDxfRWxhxAQ5YmzwZiQ=";
}; };
dontBuild = true; dontBuild = true;
@ -26,6 +26,7 @@ stdenv.mkDerivation rec {
makeWrapper makeWrapper
python3 python3
]; ];
propagatedBuildInputs = with python3.pkgs; [ propagatedBuildInputs = with python3.pkgs; [
pyqt6 pyqt6
docutils docutils
@ -36,7 +37,7 @@ stdenv.mkDerivation rec {
exec = "leo %U"; exec = "leo %U";
icon = "leoapp32"; icon = "leoapp32";
type = "Application"; type = "Application";
comment = meta.description; comment = finalAttrs.meta.description;
desktopName = "Leo"; desktopName = "Leo";
genericName = "Text Editor"; genericName = "Text Editor";
categories = [ categories = [
@ -82,6 +83,8 @@ stdenv.mkDerivation rec {
}; };
installPhase = '' installPhase = ''
runHook preInstall
mkdir -p "$out/share/icons/hicolor/32x32/apps" mkdir -p "$out/share/icons/hicolor/32x32/apps"
cp leo/Icons/leoapp32.png "$out/share/icons/hicolor/32x32/apps" cp leo/Icons/leoapp32.png "$out/share/icons/hicolor/32x32/apps"
@ -96,17 +99,19 @@ stdenv.mkDerivation rec {
--add-flags "-O $out/share/leo-editor/launchLeo.py" --add-flags "-O $out/share/leo-editor/launchLeo.py"
wrapQtApp $out/bin/leo wrapQtApp $out/bin/leo
runHook postInstall
''; '';
meta = with lib; { meta = {
homepage = "https://leo-editor.github.io/leo-editor/"; homepage = "https://leo-editor.github.io/leo-editor/";
description = "Powerful folding editor"; description = "Powerful folding editor";
longDescription = "Leo is a PIM, IDE and outliner that accelerates the work flow of programmers, authors and web designers."; longDescription = "Leo is a PIM, IDE and outliner that accelerates the work flow of programmers, authors and web designers.";
license = licenses.mit; license = lib.licenses.mit;
maintainers = with maintainers; [ maintainers = with lib.maintainers; [
leonardoce leonardoce
kashw2 kashw2
]; ];
mainProgram = "leo"; mainProgram = "leo";
}; };
} })