2023-05-24 13:37:59 +00:00
|
|
|
{ lib, fetchFromGitHub, python3, tk, makeDesktopItem, copyDesktopItems }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
with python3.pkgs;
|
|
|
|
|
|
|
|
buildPythonApplication rec {
|
|
|
|
pname = "thonny";
|
2023-08-10 07:59:29 +00:00
|
|
|
version = "4.1.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = pname;
|
|
|
|
repo = pname;
|
2023-02-02 18:25:31 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-08-10 07:59:29 +00:00
|
|
|
hash = "sha256-DlizSm5cDvYXQ8Gok+W/RTSaAWJTkdyTQ4uewOiDVXg=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
nativeBuildInputs = [ copyDesktopItems ];
|
|
|
|
|
|
|
|
desktopItems = [ (makeDesktopItem {
|
|
|
|
name = "Thonny";
|
|
|
|
exec = "thonny";
|
|
|
|
icon = "thonny";
|
|
|
|
desktopName = "Thonny";
|
|
|
|
comment = "Python IDE for beginners";
|
2022-03-05 16:20:37 +00:00
|
|
|
categories = [ "Development" "IDE" ];
|
2021-12-06 16:07:01 +00:00
|
|
|
}) ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = with python3.pkgs; [
|
|
|
|
jedi
|
|
|
|
pyserial
|
|
|
|
tkinter
|
|
|
|
docutils
|
|
|
|
pylint
|
|
|
|
mypy
|
|
|
|
pyperclip
|
|
|
|
asttokens
|
|
|
|
send2trash
|
|
|
|
];
|
|
|
|
|
|
|
|
preInstall = ''
|
|
|
|
export HOME=$(mktemp -d)
|
|
|
|
'';
|
|
|
|
|
|
|
|
preFixup = ''
|
|
|
|
wrapProgram "$out/bin/thonny" \
|
|
|
|
--prefix PYTHONPATH : $PYTHONPATH:$(toPythonPath ${python3.pkgs.jedi})
|
|
|
|
'';
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
postInstall = ''
|
|
|
|
install -Dm644 ./packaging/icons/thonny-48x48.png $out/share/icons/hicolor/48x48/apps/thonny.png
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
# Tests need a DISPLAY
|
|
|
|
doCheck = false;
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Python IDE for beginners";
|
|
|
|
longDescription = ''
|
|
|
|
Thonny is a Python IDE for beginners. It supports different ways
|
|
|
|
of stepping through the code, step-by-step expression
|
|
|
|
evaluation, detailed visualization of the call stack and a mode
|
|
|
|
for explaining the concepts of references and heap.
|
|
|
|
'';
|
|
|
|
homepage = "https://www.thonny.org/";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ leenaars ];
|
2023-07-15 17:15:38 +00:00
|
|
|
platforms = platforms.unix;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|