Merge pull request #204536 from tjni/spsdk

This commit is contained in:
Sandro 2022-12-13 17:40:40 +01:00 committed by GitHub
commit 9949ac4770
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 61 additions and 25 deletions

View file

@ -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 ];
};
}

View file

@ -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; {

View file

@ -1760,6 +1760,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 { };