From 1070be5fe43fdda1b185c55f51457a7710bd7337 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 9 Nov 2021 23:42:44 +0100 Subject: [PATCH 1/5] python3Packages.multiprocess: 0.10.9 -> 0.70.12.2 --- .../python-modules/multiprocess/default.nix | 28 ++++++++++++++----- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/multiprocess/default.nix b/pkgs/development/python-modules/multiprocess/default.nix index df304efb9199..491aa131bb59 100644 --- a/pkgs/development/python-modules/multiprocess/default.nix +++ b/pkgs/development/python-modules/multiprocess/default.nix @@ -1,22 +1,36 @@ -{ lib, buildPythonPackage, fetchPypi, dill }: +{ lib +, buildPythonPackage +, dill +, fetchFromGitHub +}: buildPythonPackage rec { pname = "multiprocess"; - version = "0.70.9"; + version = "0.70.12.2"; + format = "setuptools"; - src = fetchPypi { - inherit pname version; - sha256 = "9fd5bd990132da77e73dec6e9613408602a4612e1d73caf2e2b813d2b61508e5"; + src = fetchFromGitHub { + owner = "uqfoundation"; + repo = pname; + rev = "multiprocess-${version}"; + sha256 = "1npikdgj0qriqj384vg22qgq2xqylypk67sx1qfmdzvk6c4iyg0w"; }; - propagatedBuildInputs = [ dill ]; + propagatedBuildInputs = [ + dill + ]; # Python-version dependent tests doCheck = false; + pythonImportsCheck = [ + "multiprocess" + ]; + meta = with lib; { - description = "Better multiprocessing and multithreading in python"; + description = "Multiprocessing and multithreading in Python"; homepage = "https://github.com/uqfoundation/multiprocess"; license = licenses.bsd3; + maintainers = with maintainers; [ ]; }; } From 1802e1888ba7b12a0d7554775bcc7d5fecb50742 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 9 Nov 2021 23:58:09 +0100 Subject: [PATCH 2/5] python3Packages.unicorn: add pythonImportsCheck --- .../python-modules/unicorn/default.nix | 22 ++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/unicorn/default.nix b/pkgs/development/python-modules/unicorn/default.nix index 484f422adf3e..c9043afa85d9 100644 --- a/pkgs/development/python-modules/unicorn/default.nix +++ b/pkgs/development/python-modules/unicorn/default.nix @@ -1,10 +1,17 @@ -{ lib, stdenv, buildPythonPackage, setuptools, unicorn-emu }: +{ lib +, stdenv +, buildPythonPackage +, setuptools +, unicorn-emu +}: buildPythonPackage rec { pname = "unicorn"; version = lib.getVersion unicorn-emu; + format = "setuptools"; src = unicorn-emu.src; + sourceRoot = "source/bindings/python"; prePatch = '' @@ -12,12 +19,21 @@ buildPythonPackage rec { ln -s ${unicorn-emu}/lib/libunicorn.a prebuilt/ ''; - propagatedBuildInputs = [ setuptools ]; + propagatedBuildInputs = [ + setuptools + ]; + + # No tests present + doCheck = false; + + pythonImportsCheck = [ + "unicorn" + ]; meta = with lib; { description = "Python bindings for Unicorn CPU emulator engine"; homepage = "https://www.unicorn-engine.org/"; - license = [ licenses.gpl2 ]; + license = licenses.gpl2Plus; maintainers = with maintainers; [ bennofs ris ]; }; } From a402f9c9ea1f9c57bc6a8f2177a450b2fb767bf7 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 10 Nov 2021 00:05:47 +0100 Subject: [PATCH 3/5] unicorn: 1.0.3 -> 2.0.0-rc4 --- pkgs/development/libraries/unicorn/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/unicorn/default.nix b/pkgs/development/libraries/unicorn/default.nix index 0a760c07a97e..57983537ad14 100644 --- a/pkgs/development/libraries/unicorn/default.nix +++ b/pkgs/development/libraries/unicorn/default.nix @@ -6,13 +6,13 @@ stdenv.mkDerivation rec { pname = "unicorn"; - version = "1.0.3"; + version = "2.0.0-rc4"; src = fetchFromGitHub { owner = "unicorn-engine"; repo = pname; rev = version; - sha256 = "079azb1df4nwsnsck36b200rnf03aqilw30h3fiaqi1ixash957k"; + sha256 = "sha256-dNBebXp8HVmmY1RVRYuRFoJ3PStCf4taNTeYKi2lhQM="; }; nativeBuildInputs = [ pkg-config cmake ]; From cb737c9edb4082bab9606c360e90835f205184d9 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 10 Nov 2021 00:06:20 +0100 Subject: [PATCH 4/5] python3Packages.qiling: 1.3.0 -> 1.4.0 --- .../python-modules/qiling/default.nix | 36 ++++++++++++------- 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/pkgs/development/python-modules/qiling/default.nix b/pkgs/development/python-modules/qiling/default.nix index 61787548f846..3576f5b73660 100644 --- a/pkgs/development/python-modules/qiling/default.nix +++ b/pkgs/development/python-modules/qiling/default.nix @@ -1,33 +1,43 @@ { lib , buildPythonPackage -, fetchPypi , capstone -, unicorn -, pefile -, python-registry -, keystone-engine -, pyelftools +, fetchFromGitHub +, fetchPypi , gevent +, keystone-engine +, multiprocess +, pefile +, pyelftools +, python-registry +, unicorn }: + buildPythonPackage rec { pname = "qiling"; - version = "1.3.0"; + version = "1.4.0"; + format = "setuptools"; src = fetchPypi { inherit pname version; - sha256 = "084ad706f6803d7de2391eab928ecf4cb3e8d892fd2988666d4791a422d6ab9a"; + sha256 = "sha256-xUoNHMyGN0G2itVcKLsk+7QKxZdguzyh6OZCqCHNB4Y="; }; propagatedBuildInputs = [ capstone - unicorn - pefile - python-registry - keystone-engine - pyelftools gevent + keystone-engine + multiprocess + pefile + pyelftools + python-registry + unicorn ]; + postPatch = '' + substituteInPlace setup.py \ + --replace "pefile==2021.5.24" "pefile>=2021.5.24" + ''; + # Tests are broken (attempt to import a file that tells you not to import it, # amongst other things) doCheck = false; From 6599cb61aaa00e4b97c2ffcae0898821995f6460 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 10 Nov 2021 02:22:17 +0100 Subject: [PATCH 5/5] python3Packages.manticore: 0.3.5 -> 0.3.6 --- .../python-modules/manticore/default.nix | 52 +++++++++++++------ 1 file changed, 37 insertions(+), 15 deletions(-) diff --git a/pkgs/development/python-modules/manticore/default.nix b/pkgs/development/python-modules/manticore/default.nix index 9e0938fb1486..0c36f2cc6cc6 100644 --- a/pkgs/development/python-modules/manticore/default.nix +++ b/pkgs/development/python-modules/manticore/default.nix @@ -1,38 +1,46 @@ { lib , buildPythonPackage -, fetchFromGitHub , capstone , crytic-compile +, fetchFromGitHub +, intervaltree , ply , prettytable +, protobuf , pyelftools , pyevmasm , pysha3 +, pytestCheckHook +, pythonOlder , pyyaml , rlp , stdenv , unicorn , wasm , yices -, pytestCheckHook , z3 }: buildPythonPackage rec { pname = "manticore"; - version = "0.3.5"; + version = "0.3.6"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "trailofbits"; repo = "manticore"; rev = version; - sha256 = "0z2nhfcraa5dx6srbrw8s11awh2la0x7d88yw9in8g548nv6qa69"; + sha256 = "sha256-L112YwrBcdcLBeBsPLWt3C57u2WDvGLq50EzW9ojdyg="; }; propagatedBuildInputs = [ crytic-compile + intervaltree ply prettytable + protobuf pyevmasm pysha3 pyyaml @@ -49,22 +57,29 @@ buildPythonPackage rec { sed -ie s/z3-solver// setup.py ''; - checkInputs = [ pytestCheckHook ]; - preCheck = "export PATH=${yices}/bin:${z3}/bin:$PATH"; - pytestFlagsArray = [ - "--ignore=tests/ethereum" # TODO: enable when solc works again - "--ignore=tests/ethereum_bench" - ] ++ lib.optionals (!stdenv.isLinux) [ - "--ignore=tests/native" - "--ignore=tests/other/test_locking.py" - "--ignore=tests/other/test_state_introspection.py" + checkInputs = [ + pytestCheckHook ]; + + preCheck = '' + export PATH=${yices}/bin:${z3}/bin:$PATH + ''; + + disabledTestPaths = [ + "tests/ethereum" # Enable when solc works again + "tests/ethereum_bench" + ] ++ lib.optionals (!stdenv.isLinux) [ + "tests/native" + "tests/other/test_locking.py" + "tests/other/test_state_introspection.py" + ]; + disabledTests = [ - # failing tests + # Failing tests "test_chmod" "test_timeout" "test_wasm_main" - # slow tests + # Slow tests "testmprotectFailSymbReading" "test_ConstraintsForking" "test_resume" @@ -97,6 +112,13 @@ buildPythonPackage rec { "test_implicit_call" "test_trace" "test_plugin" + # Tests are failing with latest unicorn + "Aarch64UnicornInstructions" + "test_integration_resume" + ]; + + pythonImportsCheck = [ + "manticore" ]; meta = with lib; {