git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #145273 from fabaff/fix-qiling

python3Packages.qiling: 1.3.0 -> 1.4.0, unicorn: 1.0.3 -> 2.0.0-rc4

commitf140fdb18de9f833d6ff0e7cd934232032a2b958 authorFabian Affolter <fabian@affolter-engineering.ch> dateTue 16 Nov 2021, 19:59 (5 years ago) parentd74b9ba6599cb6
5 files changed+99−37
pkgs/development/libraries/unicorn/default.nix+2−2 pkgs/development/python-modules/manticore/default.nix+36−14 pkgs/development/python-modules/multiprocess/default.nix+21−7 pkgs/development/python-modules/qiling/default.nix+21−11 pkgs/development/python-modules/unicorn/default.nix+19−3
pkgs/development/libraries/unicorn/default.nix+2−2
@@ -6,13 +6,13 @@
66
77stdenv.mkDerivation rec {
88 pname = "unicorn";
9− version = "1.0.3";
9+ version = "2.0.0-rc4";
1010
1111 src = fetchFromGitHub {
1212 owner = "unicorn-engine";
1313 repo = pname;
1414 rev = version;
15− sha256 = "079azb1df4nwsnsck36b200rnf03aqilw30h3fiaqi1ixash957k";
15+ sha256 = "sha256-dNBebXp8HVmmY1RVRYuRFoJ3PStCf4taNTeYKi2lhQM=";
1616 };
1717
1818 nativeBuildInputs = [ pkg-config cmake ];
pkgs/development/python-modules/manticore/default.nix+36−14
@@ -1,38 +1,46 @@
11{ lib
22, buildPythonPackage
3−, fetchFromGitHub
43, capstone
54, crytic-compile
5+, fetchFromGitHub
6+, intervaltree
67, ply
78, prettytable
9+, protobuf
810, pyelftools
911, pyevmasm
1012, pysha3
13+, pytestCheckHook
14+, pythonOlder
1115, pyyaml
1216, rlp
1317, stdenv
1418, unicorn
1519, wasm
1620, yices
17−, pytestCheckHook
1821, z3
1922}:
2023
2124buildPythonPackage rec {
2225 pname = "manticore";
23− version = "0.3.5";
26+ version = "0.3.6";
27+ format = "setuptools";
28+
29+ disabled = pythonOlder "3.7";
2430
2531 src = fetchFromGitHub {
2632 owner = "trailofbits";
2733 repo = "manticore";
2834 rev = version;
29− sha256 = "0z2nhfcraa5dx6srbrw8s11awh2la0x7d88yw9in8g548nv6qa69";
35+ sha256 = "sha256-L112YwrBcdcLBeBsPLWt3C57u2WDvGLq50EzW9ojdyg=";
3036 };
3137
3238 propagatedBuildInputs = [
3339 crytic-compile
40+ intervaltree
3441 ply
3542 prettytable
43+ protobuf
3644 pyevmasm
3745 pysha3
3846 pyyaml
@@ -49,22 +57,29 @@ buildPythonPackage rec {
4957 sed -ie s/z3-solver// setup.py
5058 '';
5159
52− checkInputs = [ pytestCheckHook ];
53− preCheck = "export PATH=${yices}/bin:${z3}/bin:$PATH";
54− pytestFlagsArray = [
55− "--ignore=tests/ethereum" # TODO: enable when solc works again
56− "--ignore=tests/ethereum_bench"
60+ checkInputs = [
61+ pytestCheckHook
62+ ];
63+
64+ preCheck = ''
65+ export PATH=${yices}/bin:${z3}/bin:$PATH
66+ '';
67+
68+ disabledTestPaths = [
69+ "tests/ethereum" # Enable when solc works again
70+ "tests/ethereum_bench"
5771 ] ++ lib.optionals (!stdenv.isLinux) [
58− "--ignore=tests/native"
59− "--ignore=tests/other/test_locking.py"
60− "--ignore=tests/other/test_state_introspection.py"
72+ "tests/native"
73+ "tests/other/test_locking.py"
74+ "tests/other/test_state_introspection.py"
6175 ];
76+
6277 disabledTests = [
63− # failing tests
78+ # Failing tests
6479 "test_chmod"
6580 "test_timeout"
6681 "test_wasm_main"
67− # slow tests
82+ # Slow tests
6883 "testmprotectFailSymbReading"
6984 "test_ConstraintsForking"
7085 "test_resume"
@@ -97,6 +112,13 @@ buildPythonPackage rec {
97112 "test_implicit_call"
98113 "test_trace"
99114 "test_plugin"
115+ # Tests are failing with latest unicorn
116+ "Aarch64UnicornInstructions"
117+ "test_integration_resume"
118+ ];
119+
120+ pythonImportsCheck = [
121+ "manticore"
100122 ];
101123
102124 meta = with lib; {
pkgs/development/python-modules/multiprocess/default.nix+21−7
@@ -1,22 +1,36 @@
1−{ lib, buildPythonPackage, fetchPypi, dill }:
1+{ lib
2+, buildPythonPackage
3+, dill
4+, fetchFromGitHub
5+}:
26
37buildPythonPackage rec {
48 pname = "multiprocess";
5− version = "0.70.9";
9+ version = "0.70.12.2";
10+ format = "setuptools";
611
7− src = fetchPypi {
8− inherit pname version;
9− sha256 = "9fd5bd990132da77e73dec6e9613408602a4612e1d73caf2e2b813d2b61508e5";
12+ src = fetchFromGitHub {
13+ owner = "uqfoundation";
14+ repo = pname;
15+ rev = "multiprocess-${version}";
16+ sha256 = "1npikdgj0qriqj384vg22qgq2xqylypk67sx1qfmdzvk6c4iyg0w";
1017 };
1118
12− propagatedBuildInputs = [ dill ];
19+ propagatedBuildInputs = [
20+ dill
21+ ];
1322
1423 # Python-version dependent tests
1524 doCheck = false;
1625
26+ pythonImportsCheck = [
27+ "multiprocess"
28+ ];
29+
1730 meta = with lib; {
18− description = "Better multiprocessing and multithreading in python";
31+ description = "Multiprocessing and multithreading in Python";
1932 homepage = "https://github.com/uqfoundation/multiprocess";
2033 license = licenses.bsd3;
34+ maintainers = with maintainers; [ ];
2135 };
2236}
pkgs/development/python-modules/qiling/default.nix+21−11
@@ -1,33 +1,43 @@
11{ lib
22, buildPythonPackage
3−, fetchPypi
43, capstone
5−, unicorn
6−, pefile
7−, python-registry
4+, fetchFromGitHub
5+, fetchPypi
6+, gevent
87, keystone-engine
8+, multiprocess
9+, pefile
910, pyelftools
10−, gevent
11+, python-registry
12+, unicorn
1113}:
14+
1215buildPythonPackage rec {
1316 pname = "qiling";
14− version = "1.3.0";
17+ version = "1.4.0";
18+ format = "setuptools";
1519
1620 src = fetchPypi {
1721 inherit pname version;
18− sha256 = "084ad706f6803d7de2391eab928ecf4cb3e8d892fd2988666d4791a422d6ab9a";
22+ sha256 = "sha256-xUoNHMyGN0G2itVcKLsk+7QKxZdguzyh6OZCqCHNB4Y=";
1923 };
2024
2125 propagatedBuildInputs = [
2226 capstone
23− unicorn
24− pefile
25− python-registry
27+ gevent
2628 keystone-engine
29+ multiprocess
30+ pefile
2731 pyelftools
28− gevent
32+ python-registry
33+ unicorn
2934 ];
3035
36+ postPatch = ''
37+ substituteInPlace setup.py \
38+ --replace "pefile==2021.5.24" "pefile>=2021.5.24"
39+ '';
40+
3141 # Tests are broken (attempt to import a file that tells you not to import it,
3242 # amongst other things)
3343 doCheck = false;
pkgs/development/python-modules/unicorn/default.nix+19−3
@@ -1,10 +1,17 @@
1−{ lib, stdenv, buildPythonPackage, setuptools, unicorn-emu }:
1+{ lib
2+, stdenv
3+, buildPythonPackage
4+, setuptools
5+, unicorn-emu
6+}:
27
38buildPythonPackage rec {
49 pname = "unicorn";
510 version = lib.getVersion unicorn-emu;
11+ format = "setuptools";
612
713 src = unicorn-emu.src;
14+
815 sourceRoot = "source/bindings/python";
916
1017 prePatch = ''
@@ -12,12 +19,21 @@ buildPythonPackage rec {
1219 ln -s ${unicorn-emu}/lib/libunicorn.a prebuilt/
1320 '';
1421
15− propagatedBuildInputs = [ setuptools ];
22+ propagatedBuildInputs = [
23+ setuptools
24+ ];
25+
26+ # No tests present
27+ doCheck = false;
28+
29+ pythonImportsCheck = [
30+ "unicorn"
31+ ];
1632
1733 meta = with lib; {
1834 description = "Python bindings for Unicorn CPU emulator engine";
1935 homepage = "https://www.unicorn-engine.org/";
20− license = [ licenses.gpl2 ];
36+ license = licenses.gpl2Plus;
2137 maintainers = with maintainers; [ bennofs ris ];
2238 };
2339}