@@ -1,4 +1,4 @@
1−{ lib, fetchFromGitHub, python3 }:
1+{ lib, fetchFromGitHub, python3, makeDesktopItem, copyDesktopItems }:
22
33with python3.pkgs;
44
@@ -13,6 +13,17 @@ buildPythonApplication rec {
1313 sha256 = "13l8blq7y6p7a235x2lfiqml1bd4ba2brm3vfvs8wasjh3fvm9g5";
1414 };
1515
16+ nativeBuildInputs = [ copyDesktopItems ];
17+
18+ desktopItems = [ (makeDesktopItem {
19+ name = "Thonny";
20+ exec = "thonny";
21+ icon = "thonny";
22+ desktopName = "Thonny";
23+ comment = "Python IDE for beginners";
24+ categories = "Development;IDE";
25+ }) ];
26+
1627 propagatedBuildInputs = with python3.pkgs; [
1728 jedi
1829 pyserial
@@ -34,6 +45,10 @@ buildPythonApplication rec {
3445 --prefix PYTHONPATH : $PYTHONPATH:$(toPythonPath ${python3.pkgs.jedi})
3546 '';
3647
48+ postInstall = ''
49+ install -Dm644 ./packaging/icons/thonny-48x48.png $out/share/icons/hicolor/48x48/apps/thonny.png
50+ '';
51+
3752 # Tests need a DISPLAY
3853 doCheck = false;
3954