From c53d14793179d4ab7e73a22ad33928645a30d9fe Mon Sep 17 00:00:00 2001 From: Pyrox Date: Tue, 15 Oct 2024 19:37:24 -0400 Subject: [PATCH 1/3] python312Packages.androguard: Remove unused dependencies --- pkgs/development/python-modules/androguard/default.nix | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pkgs/development/python-modules/androguard/default.nix b/pkgs/development/python-modules/androguard/default.nix index c5a4300736ee..567dce142208 100644 --- a/pkgs/development/python-modules/androguard/default.nix +++ b/pkgs/development/python-modules/androguard/default.nix @@ -18,8 +18,6 @@ pytestCheckHook, mock, python-magic, - codecov, - coverage, qt5, # This is usually used as a library, and it'd be a shame to force the GUI # libraries to the closure if GUI is not desired. @@ -73,8 +71,6 @@ buildPythonPackage rec { nativeCheckInputs = [ pytestCheckHook - codecov - coverage mock pyperclip pyqt5 From 15ce3382c52ce32ad1c5909e0dd6df1be7a0e04f Mon Sep 17 00:00:00 2001 From: Pyrox Date: Tue, 15 Oct 2024 19:37:38 -0400 Subject: [PATCH 2/3] python312Packages.androguard: Remove mock dependency --- .../python-modules/androguard/default.nix | 2 -- .../python-modules/androguard/fix-tests.patch | 17 +++++++++++++++-- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/androguard/default.nix b/pkgs/development/python-modules/androguard/default.nix index 567dce142208..2b465cfdbb0b 100644 --- a/pkgs/development/python-modules/androguard/default.nix +++ b/pkgs/development/python-modules/androguard/default.nix @@ -16,7 +16,6 @@ pyqt5, pyperclip, pytestCheckHook, - mock, python-magic, qt5, # This is usually used as a library, and it'd be a shame to force the GUI @@ -71,7 +70,6 @@ buildPythonPackage rec { nativeCheckInputs = [ pytestCheckHook - mock pyperclip pyqt5 python-magic diff --git a/pkgs/development/python-modules/androguard/fix-tests.patch b/pkgs/development/python-modules/androguard/fix-tests.patch index b971b46c6244..267f839eb91b 100644 --- a/pkgs/development/python-modules/androguard/fix-tests.patch +++ b/pkgs/development/python-modules/androguard/fix-tests.patch @@ -1,8 +1,21 @@ +diff --git a/tests/dataflow_test.py b/tests/dataflow_test.py +index e9ac3cdb..edef8200 100644 +--- a/tests/dataflow_test.py ++++ b/tests/dataflow_test.py +@@ -5,7 +5,7 @@ import sys + sys.path.append('.') + + import collections +-import mock ++from unittest import mock + import unittest + from androguard.decompiler.dad import dataflow + from androguard.decompiler.dad import graph diff --git a/tests/test_types.py b/tests/test_types.py -index 127dfc20eb..f1c89f0712 100644 +index 127dfc20..f1c89f07 100644 --- a/tests/test_types.py +++ b/tests/test_types.py -@@ -182,7 +182,7 @@ +@@ -182,7 +182,7 @@ class TypesTest(unittest.TestCase): for i in filter(lambda x: 'const' in x.get_name(), method.get_instructions()): i.show(0) # ins should only have one literal From 3bba38c34cb676d0e9b0e196b8c174316f7db0cd Mon Sep 17 00:00:00 2001 From: Pyrox Date: Tue, 15 Oct 2024 19:38:07 -0400 Subject: [PATCH 3/3] python312Packages.androguard: Remove `with lib;` --- pkgs/development/python-modules/androguard/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/androguard/default.nix b/pkgs/development/python-modules/androguard/default.nix index 2b465cfdbb0b..a688939a84f2 100644 --- a/pkgs/development/python-modules/androguard/default.nix +++ b/pkgs/development/python-modules/androguard/default.nix @@ -82,10 +82,10 @@ buildPythonPackage rec { makeWrapperArgs+=("''${qtWrapperArgs[@]}") ''; - meta = with lib; { + meta = { description = "Tool and Python library to interact with Android Files"; homepage = "https://github.com/androguard/androguard"; - license = licenses.asl20; - maintainers = with maintainers; [ pmiddend ]; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ pmiddend ]; }; }