From 02aba12b71bd0cdd3df71752f8a2318c5ecb9aa6 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 15 Sep 2024 06:53:50 +0000 Subject: [PATCH 1/5] thonny: 4.1.4 -> 4.1.6 --- pkgs/applications/editors/thonny/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/editors/thonny/default.nix b/pkgs/applications/editors/thonny/default.nix index d2aabf5a92f8..d051d2818e23 100644 --- a/pkgs/applications/editors/thonny/default.nix +++ b/pkgs/applications/editors/thonny/default.nix @@ -4,13 +4,13 @@ with python3.pkgs; buildPythonApplication rec { pname = "thonny"; - version = "4.1.4"; + version = "4.1.6"; src = fetchFromGitHub { owner = pname; repo = pname; rev = "refs/tags/v${version}"; - hash = "sha256-f4wR5OPzWbtSqE+hSW2zD8u3pPl5nPTtGvf2LzOXjI4="; + hash = "sha256-/ms2RESnV3bsJpK1zYYLHNUu1FtA6PntaseTbKMfUMc="; }; nativeBuildInputs = [ copyDesktopItems ]; From 61fd4d4a3d1d520a5d02d6e7a01d6c358ba21570 Mon Sep 17 00:00:00 2001 From: Nikolay Korotkiy Date: Sun, 15 Sep 2024 13:30:05 +0400 Subject: [PATCH 2/5] thonny: add darwin bundle --- pkgs/applications/editors/thonny/default.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/editors/thonny/default.nix b/pkgs/applications/editors/thonny/default.nix index d051d2818e23..0ff468dcd38a 100644 --- a/pkgs/applications/editors/thonny/default.nix +++ b/pkgs/applications/editors/thonny/default.nix @@ -1,4 +1,4 @@ -{ lib, fetchFromGitHub, python3, makeDesktopItem, copyDesktopItems }: +{ lib, stdenv, fetchFromGitHub, python3, makeDesktopItem, copyDesktopItems, desktopToDarwinBundle }: with python3.pkgs; @@ -13,7 +13,8 @@ buildPythonApplication rec { hash = "sha256-/ms2RESnV3bsJpK1zYYLHNUu1FtA6PntaseTbKMfUMc="; }; - nativeBuildInputs = [ copyDesktopItems ]; + nativeBuildInputs = [ copyDesktopItems ] + ++ lib.optional stdenv.isDarwin desktopToDarwinBundle; desktopItems = [ (makeDesktopItem { name = "Thonny"; @@ -24,7 +25,7 @@ buildPythonApplication rec { categories = [ "Development" "IDE" ]; }) ]; - propagatedBuildInputs = with python3.pkgs; [ + propagatedBuildInputs = with python3.pkgs; ([ jedi pyserial tkinter @@ -34,8 +35,9 @@ buildPythonApplication rec { pyperclip asttokens send2trash + ] ++ lib.optionals stdenv.isLinux [ dbus-next - ]; + ]); preInstall = '' export HOME=$(mktemp -d) From 7d0b98b4b5f4568249ac6cbf50b11fcdc7830a21 Mon Sep 17 00:00:00 2001 From: Nikolay Korotkiy Date: Sun, 15 Sep 2024 13:32:01 +0400 Subject: [PATCH 3/5] thonny: migrate to by-name --- .../thonny/default.nix => by-name/th/thonny/package.nix} | 0 pkgs/top-level/all-packages.nix | 2 -- 2 files changed, 2 deletions(-) rename pkgs/{applications/editors/thonny/default.nix => by-name/th/thonny/package.nix} (100%) diff --git a/pkgs/applications/editors/thonny/default.nix b/pkgs/by-name/th/thonny/package.nix similarity index 100% rename from pkgs/applications/editors/thonny/default.nix rename to pkgs/by-name/th/thonny/package.nix diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 153f1675d545..c69fb86a1351 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -33608,8 +33608,6 @@ with pkgs; thokr = callPackage ../applications/misc/thokr { }; - thonny = callPackage ../applications/editors/thonny { }; - betterbird-unwrapped = callPackage ../applications/networking/mailreaders/betterbird { }; betterbird = wrapThunderbird betterbird-unwrapped { desktopName = "Betterbird"; From b28301d784662f8974d1203bdf933c04f84ab098 Mon Sep 17 00:00:00 2001 From: Nikolay Korotkiy Date: Sun, 15 Sep 2024 13:35:37 +0400 Subject: [PATCH 4/5] thonny: nixfmt-rfc-style --- pkgs/by-name/th/thonny/package.nix | 65 +++++++++++++++++++----------- 1 file changed, 41 insertions(+), 24 deletions(-) diff --git a/pkgs/by-name/th/thonny/package.nix b/pkgs/by-name/th/thonny/package.nix index 0ff468dcd38a..a3448dacf3ef 100644 --- a/pkgs/by-name/th/thonny/package.nix +++ b/pkgs/by-name/th/thonny/package.nix @@ -1,4 +1,12 @@ -{ lib, stdenv, fetchFromGitHub, python3, makeDesktopItem, copyDesktopItems, desktopToDarwinBundle }: +{ + lib, + stdenv, + fetchFromGitHub, + python3, + makeDesktopItem, + copyDesktopItems, + desktopToDarwinBundle, +}: with python3.pkgs; @@ -13,31 +21,40 @@ buildPythonApplication rec { hash = "sha256-/ms2RESnV3bsJpK1zYYLHNUu1FtA6PntaseTbKMfUMc="; }; - nativeBuildInputs = [ copyDesktopItems ] - ++ lib.optional stdenv.isDarwin desktopToDarwinBundle; + nativeBuildInputs = [ copyDesktopItems ] ++ lib.optional stdenv.isDarwin desktopToDarwinBundle; - desktopItems = [ (makeDesktopItem { - name = "Thonny"; - exec = "thonny"; - icon = "thonny"; - desktopName = "Thonny"; - comment = "Python IDE for beginners"; - categories = [ "Development" "IDE" ]; - }) ]; + desktopItems = [ + (makeDesktopItem { + name = "Thonny"; + exec = "thonny"; + icon = "thonny"; + desktopName = "Thonny"; + comment = "Python IDE for beginners"; + categories = [ + "Development" + "IDE" + ]; + }) + ]; - propagatedBuildInputs = with python3.pkgs; ([ - jedi - pyserial - tkinter - docutils - pylint - mypy - pyperclip - asttokens - send2trash - ] ++ lib.optionals stdenv.isLinux [ - dbus-next - ]); + propagatedBuildInputs = + with python3.pkgs; + ( + [ + jedi + pyserial + tkinter + docutils + pylint + mypy + pyperclip + asttokens + send2trash + ] + ++ lib.optionals stdenv.isLinux [ + dbus-next + ] + ); preInstall = '' export HOME=$(mktemp -d) From 6cf7d32a365794f382edfa5fcd7a7181a605bc9e Mon Sep 17 00:00:00 2001 From: Nikolay Korotkiy Date: Sun, 15 Sep 2024 15:38:17 +0400 Subject: [PATCH 5/5] thonny: derivation cleanup --- pkgs/by-name/th/thonny/package.nix | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/pkgs/by-name/th/thonny/package.nix b/pkgs/by-name/th/thonny/package.nix index a3448dacf3ef..91c40a3c7b3c 100644 --- a/pkgs/by-name/th/thonny/package.nix +++ b/pkgs/by-name/th/thonny/package.nix @@ -37,7 +37,7 @@ buildPythonApplication rec { }) ]; - propagatedBuildInputs = + dependencies = with python3.pkgs; ( [ @@ -56,10 +56,6 @@ buildPythonApplication rec { ] ); - preInstall = '' - export HOME=$(mktemp -d) - ''; - preFixup = '' wrapProgram "$out/bin/thonny" \ --prefix PYTHONPATH : $PYTHONPATH:$(toPythonPath ${python3.pkgs.jedi}) @@ -72,7 +68,7 @@ buildPythonApplication rec { # Tests need a DISPLAY doCheck = false; - meta = with lib; { + meta = { description = "Python IDE for beginners"; longDescription = '' Thonny is a Python IDE for beginners. It supports different ways @@ -81,9 +77,9 @@ buildPythonApplication rec { for explaining the concepts of references and heap. ''; homepage = "https://www.thonny.org/"; - license = licenses.mit; - maintainers = with maintainers; [ leenaars ]; - platforms = platforms.unix; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ leenaars ]; + platforms = lib.platforms.unix; mainProgram = "thonny"; }; }