From 0382f94f0463af1d322b0f29007497c04c15d493 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 19 Feb 2023 22:03:09 +0100 Subject: [PATCH 1/6] python310Packages.qiling: add changelog to emta --- pkgs/development/python-modules/qiling/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/python-modules/qiling/default.nix b/pkgs/development/python-modules/qiling/default.nix index e47d0b9fbf29..42247e4b33ef 100644 --- a/pkgs/development/python-modules/qiling/default.nix +++ b/pkgs/development/python-modules/qiling/default.nix @@ -49,6 +49,7 @@ buildPythonPackage rec { meta = with lib; { description = "Qiling Advanced Binary Emulation Framework"; homepage = "https://qiling.io/"; + changelog = "https://github.com/qilingframework/qiling/releases/tag/${version}"; license = licenses.gpl2Only; maintainers = teams.determinatesystems.members; }; From a0343b268a128abb3d3a0788b3b4f2cfc5d00005 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 20 Feb 2023 08:56:11 +0100 Subject: [PATCH 2/6] python310Packages.first: add changelog to meta --- pkgs/development/python-modules/first/default.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/first/default.nix b/pkgs/development/python-modules/first/default.nix index 491fcd398053..df9eb0af5038 100644 --- a/pkgs/development/python-modules/first/default.nix +++ b/pkgs/development/python-modules/first/default.nix @@ -1,4 +1,7 @@ -{ lib, buildPythonPackage, fetchPypi }: +{ lib +, buildPythonPackage +, fetchPypi +}: buildPythonPackage rec { pname = "first"; @@ -6,7 +9,7 @@ buildPythonPackage rec { src = fetchPypi { inherit pname version; - sha256 = "1gykyrm6zlrbf9iz318p57qwk594mx1jf0d79v79g32zql45na7z"; + sha256 = "1gykyrm6zlrbf0iz318p57qwk594mx1jf0d79v79g32zql45na7z"; }; doCheck = false; # no tests @@ -14,6 +17,7 @@ buildPythonPackage rec { meta = with lib; { description = "The function you always missed in Python"; homepage = "https://github.com/hynek/first/"; + changelog = "https://github.com/hynek/first/blob/${version}/HISTORY.rst"; license = licenses.mit; maintainers = with maintainers; [ zimbatm ]; }; From c1cf12166281741e877e4c33f2c9f6c440ef3ae4 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 20 Feb 2023 08:58:27 +0100 Subject: [PATCH 3/6] python310Packages.first: add pythonImportsCheck - disable on unsupported Pythpn releases --- pkgs/development/python-modules/first/default.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/first/default.nix b/pkgs/development/python-modules/first/default.nix index df9eb0af5038..0e75f61a9f70 100644 --- a/pkgs/development/python-modules/first/default.nix +++ b/pkgs/development/python-modules/first/default.nix @@ -1,19 +1,27 @@ { lib , buildPythonPackage , fetchPypi +, pythonOlder }: buildPythonPackage rec { pname = "first"; version = "2.0.2"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - sha256 = "1gykyrm6zlrbf0iz318p57qwk594mx1jf0d79v79g32zql45na7z"; + hash = "sha256-/yhbCMVfjJfOTqcBJ0OvJJXJ8SkXhfFjcivTb2r2078="; }; doCheck = false; # no tests + pythonImportsCheck = [ + "first" + ]; + meta = with lib; { description = "The function you always missed in Python"; homepage = "https://github.com/hynek/first/"; From 0978541585d2c9fec1bbdc46df3d3633f0c09565 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 20 Feb 2023 09:04:30 +0100 Subject: [PATCH 4/6] python310Packages.overrides: init at 7.3.1 --- .../python-modules/overrides/default.nix | 37 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 39 insertions(+) create mode 100644 pkgs/development/python-modules/overrides/default.nix diff --git a/pkgs/development/python-modules/overrides/default.nix b/pkgs/development/python-modules/overrides/default.nix new file mode 100644 index 000000000000..6d916ffa639d --- /dev/null +++ b/pkgs/development/python-modules/overrides/default.nix @@ -0,0 +1,37 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pythonOlder +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "overrides"; + version = "7.3.1"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "mkorpela"; + repo = pname; + rev = "refs/tags/${version}"; + hash = "sha256-mxMh1ifOnii2SqxYjupDKvslHVGwClGtRgyoJSCGfZo="; + }; + + nativeCheckInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "overrides" + ]; + + meta = with lib; { + description = "Decorator to automatically detect mismatch when overriding a method"; + homepage = "https://github.com/mkorpela/overrides"; + changelog = "https://github.com/mkorpela/overrides/releases/tag/${version}"; + license = licenses.asl20; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 988f7e71981c..483937c1d623 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7068,6 +7068,8 @@ self: super: with self; { overpy = callPackage ../development/python-modules/overpy { }; + overrides = callPackage ../development/python-modules/overrides { }; + pandas-stubs = callPackage ../development/python-modules/pandas-stubs { }; pdunehd = callPackage ../development/python-modules/pdunehd { }; From e04006869b09a3beb45fb7825282a043a6bedd82 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 20 Feb 2023 09:48:09 +0100 Subject: [PATCH 5/6] python310Packages.python-fx: init at 0.2.0 --- .../python-modules/python-fx/default.nix | 100 ++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 102 insertions(+) create mode 100644 pkgs/development/python-modules/python-fx/default.nix diff --git a/pkgs/development/python-modules/python-fx/default.nix b/pkgs/development/python-modules/python-fx/default.nix new file mode 100644 index 000000000000..729c5ed9a180 --- /dev/null +++ b/pkgs/development/python-modules/python-fx/default.nix @@ -0,0 +1,100 @@ +{ lib +, antlr4-python3-runtime +, asciimatics +, buildPythonPackage +, click +, dacite +, decorator +, fetchFromGitHub +, future +, first +, jsonpath-ng +, loguru +, overrides +, pillow +, ply +, pyfiglet +, pyperclip +, pytestCheckHook +, pythonOlder +, antlr4 +, pythonRelaxDepsHook +, pyyaml +, setuptools +, six +, urwid +, parameterized +, wcwidth +, yamale +}: + +buildPythonPackage rec { + pname = "python-fx"; + version = "0.2.0"; + format = "setuptools"; + + disabled = pythonOlder "3.8"; + + src = fetchFromGitHub { + owner = "cielong"; + repo = "pyfx"; + rev = "refs/tags/v${version}"; + hash = "sha256-nRMeYL0JGvCtUQBUMXUsZ4+F2KX+x/CbZ61sAidT9so="; + }; + + postPatch = '' + rm src/pyfx/model/common/jsonpath/*.{g4,interp,tokens} + antlr -Dlanguage=Python3 -visitor -o src/pyfx/model/common/jsonpath/ *.g4 + ''; + + pythonRelaxDeps = true; + + nativeBuildInputs = [ + antlr4 + pythonRelaxDepsHook + setuptools + ]; + + propagatedBuildInputs = [ + antlr4-python3-runtime + asciimatics + click + dacite + decorator + first + future + jsonpath-ng + loguru + overrides + pillow + ply + pyfiglet + pyperclip + pyyaml + six + urwid + wcwidth + yamale + ]; + + nativeCheckInputs = [ + pytestCheckHook + parameterized + ]; + + # antlr4 issue prevents us from running the tests + # https://github.com/antlr/antlr4/issues/4041 + doCheck = false; + + # pythonImportsCheck = [ + # "pyfx" + # ]; + + meta = with lib; { + description = "Module to view JSON in a TUI"; + homepage = "https://github.com/cielong/pyfx"; + changelog = "https://github.com/cielong/pyfx/releases/tag/v${version}"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 483937c1d623..4afee569903a 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7300,6 +7300,8 @@ self: super: with self; { python-fullykiosk = callPackage ../development/python-modules/python-fullykiosk { }; + python-fx = callPackage ../development/python-modules/python-fx { }; + python-glanceclient = callPackage ../development/python-modules/python-glanceclient { }; python-google-nest = callPackage ../development/python-modules/python-google-nest { }; From 2da2df387370a860fb8aeb34c03485f12fb19d64 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 20 Feb 2023 09:50:02 +0100 Subject: [PATCH 6/6] python310Packages.qiling: 1.4.4 -> 1.4.5 Changelog: https://github.com/qilingframework/qiling/releases/tag/1.4.5 --- pkgs/development/python-modules/qiling/default.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/qiling/default.nix b/pkgs/development/python-modules/qiling/default.nix index 42247e4b33ef..0b008f86f884 100644 --- a/pkgs/development/python-modules/qiling/default.nix +++ b/pkgs/development/python-modules/qiling/default.nix @@ -9,21 +9,24 @@ , pefile , pyelftools , pythonOlder +, python-fx , python-registry , pyyaml +, questionary +, termcolor , unicorn }: buildPythonPackage rec { pname = "qiling"; - version = "1.4.4"; + version = "1.4.5"; format = "setuptools"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-gtPYwmQ96+jz6XrqU0ufaN7Ht6gqrtxGrDoaTWce7/U="; + hash = "sha256-MEafxry/ewqlzOMu9TJMQodXLChGMYjS2jX3yv7FZJk="; }; propagatedBuildInputs = [ @@ -33,8 +36,11 @@ buildPythonPackage rec { multiprocess pefile pyelftools + python-fx python-registry pyyaml + termcolor + questionary unicorn ];