biglybt: 3.5.0.0 -> 3.6.0.0
[NixPkgs.git] / pkgs / applications / editors / thonny / default.nix
blob8098d3d1d1e363b8775d384cece9cc7be85380f0
1 { lib, fetchFromGitHub, python3, tk, makeDesktopItem, copyDesktopItems }:
3 with python3.pkgs;
5 buildPythonApplication rec {
6   pname = "thonny";
7   version = "4.1.4";
9   src = fetchFromGitHub {
10     owner = pname;
11     repo = pname;
12     rev = "refs/tags/v${version}";
13     hash = "sha256-f4wR5OPzWbtSqE+hSW2zD8u3pPl5nPTtGvf2LzOXjI4=";
14   };
16   nativeBuildInputs = [ copyDesktopItems ];
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   }) ];
27   propagatedBuildInputs = with python3.pkgs; [
28     jedi
29     pyserial
30     tkinter
31     docutils
32     pylint
33     mypy
34     pyperclip
35     asttokens
36     send2trash
37   ];
39   preInstall = ''
40     export HOME=$(mktemp -d)
41   '';
43   preFixup = ''
44     wrapProgram "$out/bin/thonny" \
45        --prefix PYTHONPATH : $PYTHONPATH:$(toPythonPath ${python3.pkgs.jedi})
46   '';
48   postInstall = ''
49     install -Dm644 ./packaging/icons/thonny-48x48.png $out/share/icons/hicolor/48x48/apps/thonny.png
50   '';
52   # Tests need a DISPLAY
53   doCheck = false;
55   meta = with lib; {
56     description = "Python IDE for beginners";
57     longDescription = ''
58       Thonny is a Python IDE for beginners. It supports different ways
59       of stepping through the code, step-by-step expression
60       evaluation, detailed visualization of the call stack and a mode
61       for explaining the concepts of references and heap.
62     '';
63     homepage = "https://www.thonny.org/";
64     license = licenses.mit;
65     maintainers = with maintainers; [ leenaars ];
66     platforms = platforms.unix;
67     mainProgram = "thonny";
68   };