From 78746f5621ee65a381b4be1d309c65a79d48c3e6 Mon Sep 17 00:00:00 2001 From: Theodore Ni <3806110+tjni@users.noreply.github.com> Date: Sun, 4 Dec 2022 12:49:07 -0800 Subject: [PATCH 1/2] python310Packages.click-command-tree: init at 1.1.0 --- .../click-command-tree/default.nix | 49 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 51 insertions(+) create mode 100644 pkgs/development/python-modules/click-command-tree/default.nix diff --git a/pkgs/development/python-modules/click-command-tree/default.nix b/pkgs/development/python-modules/click-command-tree/default.nix new file mode 100644 index 000000000000..14903853646e --- /dev/null +++ b/pkgs/development/python-modules/click-command-tree/default.nix @@ -0,0 +1,49 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, fetchpatch +, click +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "click-command-tree"; + version = "1.1.0"; + format = "setuptools"; + + src = fetchFromGitHub { + owner = "whwright"; + repo = pname; + rev = version; + hash = "sha256-vFOcn+ibyLZnhU3OQMtnHI04UqAY2/CCvhq4EEU4XFo="; + }; + + patches = [ + (fetchpatch { + name = "remove-setup-downloading-flake8.patch"; + url = "https://github.com/whwright/click-command-tree/commit/1ecfcfa29bf01e1131e6ec712bd7338ac1283dc8.patch"; + hash = "sha256-u5jsNfEo1+XNlkVGPCM/rsDPnYko6cr2z2si9nq+sLA="; + }) + ]; + + propagatedBuildInputs = [ + click + ]; + + checkInputs = [ + pytestCheckHook + ]; + + pytestFlagsArray = [ + "tests.py" + ]; + + pythonImportsCheck = [ "click_command_tree" ]; + + meta = with lib; { + description = "click plugin to show the command tree of your CLI"; + homepage = "https://github.com/whwright/click-command-tree"; + license = licenses.mit; + maintainers = with maintainers; [ tjni ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 5e26e836eb87..e5b43818eea8 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1750,6 +1750,8 @@ self: super: with self; { clickclick = callPackage ../development/python-modules/clickclick { }; + click-command-tree = callPackage ../development/python-modules/click-command-tree { }; + click-completion = callPackage ../development/python-modules/click-completion { }; click-configfile = callPackage ../development/python-modules/click-configfile { }; From 6545a9245d94e71e63982c1c2877ec2bae79702d Mon Sep 17 00:00:00 2001 From: Theodore Ni <3806110+tjni@users.noreply.github.com> Date: Sun, 4 Dec 2022 12:57:04 -0800 Subject: [PATCH 2/2] python310Packages.spsdk: 1.6.3 -> 1.8.0 --- .../python-modules/spsdk/default.nix | 35 ++++++------------- 1 file changed, 10 insertions(+), 25 deletions(-) diff --git a/pkgs/development/python-modules/spsdk/default.nix b/pkgs/development/python-modules/spsdk/default.nix index 52dad183fa16..a4683a807278 100644 --- a/pkgs/development/python-modules/spsdk/default.nix +++ b/pkgs/development/python-modules/spsdk/default.nix @@ -1,7 +1,6 @@ { lib , buildPythonPackage , fetchFromGitHub -, fetchpatch , dos2unix , pythonRelaxDepsHook , asn1crypto @@ -9,6 +8,7 @@ , bincopy , bitstring , click +, click-command-tree , click-option-group , cmsis-pack-manager , commentjson @@ -33,42 +33,32 @@ buildPythonPackage rec { pname = "spsdk"; - version = "1.6.3"; + version = "1.8.0"; src = fetchFromGitHub { owner = "NXPmicro"; repo = pname; rev = version; - sha256 = "sha256-JMhd2XdbjEN6SUzFgcBHd/dStiuYeXXis6pfijSfUso="; + hash = "sha256-yCmkOrUe5XqbuHeo7F84j1gmdzpdpCRWdD9V74U64c4="; }; - patches = [ - # https://github.com/NXPmicro/spsdk/pull/43 - (fetchpatch { - name = "cryptography-37-compat.patch"; - url = "https://github.com/NXPmicro/spsdk/commit/a85b854de1093de593d27fa64de442224ab2e0fd.patch"; - sha256 = "sha256-4pXV/8RaNuGl7KNdoGD/8YnPQ2ZmUQOjXWA/Yy0Kxu8="; - }) - # https://github.com/NXPmicro/spsdk/pull/41 - (fetchpatch { - name = "blhost-click-8-1-compat.patch"; - url = "https://github.com/NXPmicro/spsdk/commit/5112b1b69aa681d265035475e73d28ea0c8cb6ab.patch"; - sha256 = "sha256-Okz6Er6OVuAA5IlB5IabSa/gUSLa+E2Ltd+J3uoIg6o="; - }) + nativeBuildInputs = [ + pythonRelaxDepsHook ]; - nativeBuildInputs = [ pythonRelaxDepsHook ]; pythonRelaxDeps = [ "bincopy" "bitstring" "cmsis-pack-manager" - "cryptography" "deepmerge" "jinja2" "pylink-square" "pyocd" ]; - pythonRemoveDeps = [ "pyocd-pemicro" ]; + + pythonRemoveDeps = [ + "pyocd-pemicro" + ]; propagatedBuildInputs = [ asn1crypto @@ -76,6 +66,7 @@ buildPythonPackage rec { bincopy bitstring click + click-command-tree click-option-group cmsis-pack-manager commentjson @@ -101,12 +92,6 @@ buildPythonPackage rec { voluptuous ]; - disabledTests = [ - # tests also fail on debian, so presumable they are broken - "test_elftosb_mbi_signed" - "test_elftosb_sb31" - ]; - pythonImportsCheck = [ "spsdk" ]; meta = with lib; {