git.iko.soy/typeable/nixpkgs
on master help sign in
python3Packages.cle: init at 9.0.6281
commit57542662e9f1b8bc1c4e42bde908a9b968971f35 authorFabian Affolter <mail@fabian-affolter.ch> dateMon 29 Mar 2021, 10:25 (6 years ago) parent40568b4
1 file changed+77
pkgs/development/python-modules/cle/default.nix+77
pkgs/development/python-modules/cle/default.nixnew file+77
@@ -0,0 +1,77 @@
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+}