Merge pull request #112434 from fabaff/pyxbe

authored by

Sandro and committed by
GitHub
4216cf5a 0db38eae

+227 -10
+2 -2
pkgs/development/python-modules/ailment/default.nix
··· 7 7 8 8 buildPythonPackage rec { 9 9 pname = "ailment"; 10 - version = "9.0.5903"; 10 + version = "9.0.6281"; 11 11 disabled = pythonOlder "3.6"; 12 12 13 13 src = fetchFromGitHub { 14 14 owner = "angr"; 15 15 repo = pname; 16 16 rev = "v${version}"; 17 - sha256 = "sha256-75Ul9JfMFYv3AfBlgmer6IDyfgOAS4AdXexznoxi35Y="; 17 + sha256 = "sha256-IFUGtTO+DY8FIxLgvmwM/y/RQr42T9sABPpnJMILkqg="; 18 18 }; 19 19 20 20 propagatedBuildInputs = [ pyvex ];
+93
pkgs/development/python-modules/angr/default.nix
··· 1 + { lib 2 + , ailment 3 + , archinfo 4 + , buildPythonPackage 5 + , cachetools 6 + , capstone 7 + , cffi 8 + , claripy 9 + , cle 10 + , cppheaderparser 11 + , dpkt 12 + , fetchFromGitHub 13 + , GitPython 14 + , itanium_demangler 15 + , mulpyplexer 16 + , networkx 17 + , progressbar2 18 + , protobuf 19 + , psutil 20 + , pycparser 21 + , pkgs 22 + , pythonOlder 23 + , pyvex 24 + , sqlalchemy 25 + , rpyc 26 + , sortedcontainers 27 + , unicorn 28 + }: 29 + 30 + let 31 + # Only the pinned release in setup.py works properly 32 + unicorn' = unicorn.overridePythonAttrs (old: rec { 33 + pname = "unicorn"; 34 + version = "1.0.2-rc4"; 35 + src = fetchFromGitHub { 36 + owner = "unicorn-engine"; 37 + repo = pname; 38 + rev = version; 39 + sha256 = "17nyccgk7hpc4hab24yn57f1xnmr7kq4px98zbp2bkwcrxny8gwy"; 40 + }; 41 + }); 42 + in 43 + 44 + buildPythonPackage rec { 45 + pname = "angr"; 46 + version = "9.0.6281"; 47 + disabled = pythonOlder "3.6"; 48 + 49 + src = fetchFromGitHub { 50 + owner = pname; 51 + repo = pname; 52 + rev = "v${version}"; 53 + sha256 = "10i4qdk8f342gzxiwy0pjdc35lc4q5ab7l5q420ca61cgdvxkk4r"; 54 + }; 55 + 56 + propagatedBuildInputs = [ 57 + ailment 58 + archinfo 59 + cachetools 60 + capstone 61 + cffi 62 + claripy 63 + cle 64 + cppheaderparser 65 + dpkt 66 + GitPython 67 + itanium_demangler 68 + mulpyplexer 69 + networkx 70 + progressbar2 71 + protobuf 72 + psutil 73 + sqlalchemy 74 + pycparser 75 + pyvex 76 + sqlalchemy 77 + rpyc 78 + sortedcontainers 79 + unicorn' 80 + ]; 81 + 82 + # Tests have additional requirements, e.g., pypcode and angr binaries 83 + # cle is executing the tests with the angr binaries 84 + doCheck = false; 85 + pythonImportsCheck = [ "angr" ]; 86 + 87 + meta = with lib; { 88 + description = "Powerful and user-friendly binary analysis platform"; 89 + homepage = "https://angr.io/"; 90 + license = with licenses; [ bsd2 ]; 91 + maintainers = with maintainers; [ fab ]; 92 + }; 93 + }
+2 -2
pkgs/development/python-modules/archinfo/default.nix
··· 7 7 8 8 buildPythonPackage rec { 9 9 pname = "archinfo"; 10 - version = "9.0.5903"; 10 + version = "9.0.6281"; 11 11 12 12 src = fetchFromGitHub { 13 13 owner = "angr"; 14 14 repo = pname; 15 15 rev = "v${version}"; 16 - sha256 = "sha256-4e+ZGIt/ouZj5rsmaVxUrz8gAq4Yq2+Qx4jdOojB4Sw="; 16 + sha256 = "sha256-ZO2P53RdR3cYhDbtrdGJnadFZgKkBdDi5gR/CB7YTpI="; 17 17 }; 18 18 19 19 checkInputs = [
+2 -2
pkgs/development/python-modules/claripy/default.nix
··· 13 13 14 14 buildPythonPackage rec { 15 15 pname = "claripy"; 16 - version = "9.0.5903"; 16 + version = "9.0.6281"; 17 17 disabled = pythonOlder "3.6"; 18 18 19 19 src = fetchFromGitHub { 20 20 owner = "angr"; 21 21 repo = pname; 22 22 rev = "v${version}"; 23 - sha256 = "sha256-NIKWUx1VT5TjnuqppuT6VzwNRwcBLc0xI5k3F2Nmj8A="; 23 + sha256 = "sha256-gvo8I6LQRAEUa7QiV5Sugrt+e2SmGkkKfsGn/IKz+Mk="; 24 24 }; 25 25 26 26 # Use upstream z3 implementation
+77
pkgs/development/python-modules/cle/default.nix
··· 1 + { lib 2 + , buildPythonPackage 3 + , cffi 4 + , fetchFromGitHub 5 + , minidump 6 + , nose 7 + , pefile 8 + , pyelftools 9 + , pytestCheckHook 10 + , pythonOlder 11 + , pyvex 12 + , pyxbe 13 + , sortedcontainers 14 + }: 15 + 16 + let 17 + # The binaries are following the argr projects release cycle 18 + version = "9.0.6281"; 19 + 20 + # Binary files from https://github.com/angr/binaries (only used for testing and only here) 21 + binaries = fetchFromGitHub { 22 + owner = "angr"; 23 + repo = "binaries"; 24 + rev = "v${version}"; 25 + sha256 = "1qlrxfj1n34xvwkac6mbcc7zmixxbp34fj7lkf0fvp7zcz1rpla1"; 26 + }; 27 + 28 + in 29 + buildPythonPackage rec { 30 + pname = "cle"; 31 + inherit version; 32 + disabled = pythonOlder "3.6"; 33 + 34 + src = fetchFromGitHub { 35 + owner = "angr"; 36 + repo = pname; 37 + rev = "v${version}"; 38 + sha256 = "0f2zc02dljmgp6ny6ja6917j08kqhwckncan860dq4xv93g61rmg"; 39 + }; 40 + 41 + propagatedBuildInputs = [ 42 + cffi 43 + minidump 44 + pefile 45 + pyelftools 46 + pyvex 47 + pyxbe 48 + sortedcontainers 49 + ]; 50 + 51 + checkInputs = [ 52 + nose 53 + pytestCheckHook 54 + ]; 55 + 56 + # Place test binaries in the right location (location is hard-coded in the tests) 57 + preCheck = '' 58 + export HOME=$TMPDIR 59 + cp -r ${binaries} $HOME/binaries 60 + ''; 61 + 62 + disabledTests = [ 63 + # PPC tests seems to fails 64 + "test_ppc_rel24_relocation" 65 + "test_ppc_addr16_ha_relocation" 66 + "test_ppc_addr16_lo_relocation" 67 + ]; 68 + 69 + pythonImportsCheck = [ "cle" ]; 70 + 71 + meta = with lib; { 72 + description = "Python loader for many binary formats"; 73 + homepage = "https://github.com/angr/cle"; 74 + license = with licenses; [ bsd2 ]; 75 + maintainers = with maintainers; [ fab ]; 76 + }; 77 + }
+9 -4
pkgs/development/python-modules/pyvex/default.nix
··· 2 2 , stdenv 3 3 , archinfo 4 4 , bitstring 5 - , fetchPypi 6 - , cffi 7 5 , buildPythonPackage 6 + , cffi 7 + , fetchPypi 8 8 , future 9 9 , pycparser 10 10 }: 11 11 12 12 buildPythonPackage rec { 13 13 pname = "pyvex"; 14 - version = "9.0.5903"; 14 + version = "9.0.6281"; 15 15 16 16 src = fetchPypi { 17 17 inherit pname version; 18 - sha256 = "sha256-qhLlRlmb48zhjX2u9w6TVVv2gb0E9kSapabiv+u4J2s="; 18 + sha256 = "sha256-E8BYCzV71qVNRzWCCI2yTVU88JVMA08eqnIO8OtbNlM="; 19 19 }; 20 20 21 21 propagatedBuildInputs = [ ··· 25 25 future 26 26 pycparser 27 27 ]; 28 + 29 + postPatch = '' 30 + substituteInPlace pyvex_c/Makefile \ 31 + --replace "CC=gcc" "CC=${stdenv.cc.targetPrefix}cc" 32 + ''; 28 33 29 34 # No tests are available on PyPI, GitHub release has tests 30 35 # Switch to GitHub release after all angr parts are present
+36
pkgs/development/python-modules/pyxbe/default.nix
··· 1 + { lib 2 + , buildPythonPackage 3 + , fetchFromGitHub 4 + , pytestCheckHook 5 + }: 6 + 7 + buildPythonPackage rec { 8 + pname = "pyxbe"; 9 + version = "unstable-2021-01-10"; 10 + 11 + src = fetchFromGitHub { 12 + owner = "mborgerson"; 13 + repo = pname; 14 + rev = "a7ae1bb21b02a57783831eb080c1edbafaad1d5d"; 15 + sha256 = "1cp9a5f41z8j7bzip6nhka8qnxs12v75cdf80sk2nzgf1k15wi2p"; 16 + }; 17 + 18 + checkInputs = [ 19 + pytestCheckHook 20 + ]; 21 + 22 + # Update location for run with pytest 23 + preCheck = '' 24 + substituteInPlace tests/test_load.py \ 25 + --replace "'xbefiles'" "'tests/xbefiles'" 26 + ''; 27 + 28 + pythonImportsCheck = [ "xbe" ]; 29 + 30 + meta = with lib; { 31 + description = "Library to work with XBE files"; 32 + homepage = "https://github.com/mborgerson/pyxbe"; 33 + license = with licenses; [ mit ]; 34 + maintainers = with maintainers; [ fab ]; 35 + }; 36 + }
+6
pkgs/top-level/python-packages.nix
··· 393 393 394 394 androguard = callPackage ../development/python-modules/androguard { }; 395 395 396 + angr = callPackage ../development/python-modules/angr { }; 397 + 396 398 aniso8601 = callPackage ../development/python-modules/aniso8601 { }; 397 399 398 400 annexremote = callPackage ../development/python-modules/annexremote { }; ··· 1384 1386 claripy = callPackage ../development/python-modules/claripy { }; 1385 1387 1386 1388 cld2-cffi = callPackage ../development/python-modules/cld2-cffi { }; 1389 + 1390 + cle = callPackage ../development/python-modules/cle { }; 1387 1391 1388 1392 cleo = callPackage ../development/python-modules/cleo { }; 1389 1393 ··· 7150 7154 pyworld = callPackage ../development/python-modules/pyworld { }; 7151 7155 7152 7156 pyx = callPackage ../development/python-modules/pyx { }; 7157 + 7158 + pyxbe = callPackage ../development/python-modules/pyxbe { }; 7153 7159 7154 7160 pyxdg = callPackage ../development/python-modules/pyxdg { }; 7155 7161