thonny: add desktop item

+16 -1
+16 -1
pkgs/applications/editors/thonny/default.nix
··· 1 - { lib, fetchFromGitHub, python3 }: 2 3 with python3.pkgs; 4 ··· 13 sha256 = "13l8blq7y6p7a235x2lfiqml1bd4ba2brm3vfvs8wasjh3fvm9g5"; 14 }; 15 16 propagatedBuildInputs = with python3.pkgs; [ 17 jedi 18 pyserial ··· 32 preFixup = '' 33 wrapProgram "$out/bin/thonny" \ 34 --prefix PYTHONPATH : $PYTHONPATH:$(toPythonPath ${python3.pkgs.jedi}) 35 ''; 36 37 # Tests need a DISPLAY
··· 1 + { lib, fetchFromGitHub, python3, makeDesktopItem, copyDesktopItems }: 2 3 with python3.pkgs; 4 ··· 13 sha256 = "13l8blq7y6p7a235x2lfiqml1bd4ba2brm3vfvs8wasjh3fvm9g5"; 14 }; 15 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 + 27 propagatedBuildInputs = with python3.pkgs; [ 28 jedi 29 pyserial ··· 43 preFixup = '' 44 wrapProgram "$out/bin/thonny" \ 45 --prefix PYTHONPATH : $PYTHONPATH:$(toPythonPath ${python3.pkgs.jedi}) 46 + ''; 47 + 48 + postInstall = '' 49 + install -Dm644 ./packaging/icons/thonny-48x48.png $out/share/icons/hicolor/48x48/apps/thonny.png 50 ''; 51 52 # Tests need a DISPLAY