Files
nixpkgs/pkgs/by-name/le/leo-editor/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

118 lines
2.6 KiB
Nix

{
lib,
stdenv,
python3,
fetchFromGitHub,
makeWrapper,
makeDesktopItem,
libsForQt5,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "leo-editor";
version = "6.8.6.1";
src = fetchFromGitHub {
owner = "leo-editor";
repo = "leo-editor";
tag = "v${finalAttrs.version}";
hash = "sha256-3ojiIjsGJpPgVSUi0QhIddqwsDxfRWxhxAQ5YmzwZiQ=";
};
dontBuild = true;
nativeBuildInputs = [
libsForQt5.wrapQtAppsHook
makeWrapper
python3
];
propagatedBuildInputs = with python3.pkgs; [
pyqt6
docutils
];
desktopItem = makeDesktopItem {
name = "leo-editor";
exec = "leo %U";
icon = "leoapp32";
type = "Application";
comment = finalAttrs.meta.description;
desktopName = "Leo";
genericName = "Text Editor";
categories = [
"Application"
"Development"
"IDE"
];
startupNotify = false;
mimeTypes = [
"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 = ''
runHook preInstall
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 ${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
runHook postInstall
'';
meta = {
homepage = "https://leo-editor.github.io/leo-editor/";
description = "Powerful folding editor";
longDescription = "Leo is a PIM, IDE and outliner that accelerates the work flow of programmers, authors and web designers.";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
leonardoce
kashw2
];
mainProgram = "leo";
};
})