summary refs log tree commit diff
path: root/pkgs/development/python-modules/qiling/default.nix
blob: 51c762c8107534712a83ffb9638ab006d2f91310 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
{ lib
, buildPythonPackage
, capstone
, fetchFromGitHub
, fetchPypi
, gevent
, keystone-engine
, multiprocess
, pefile
, pyelftools
, python-registry
, unicorn
}:

buildPythonPackage rec {
  pname = "qiling";
  version = "1.4.1";
  format = "setuptools";

  src = fetchPypi {
    inherit pname version;
    sha256 = "e72dc5856cbda975f962ddf063063a32bd6c3b825f75e0795e94ba6840a7d45f";
  };

  propagatedBuildInputs = [
    capstone
    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;

  pythonImportsCheck = [
    "qiling"
  ];

  meta = with lib; {
    description = "Qiling Advanced Binary Emulation Framework";
    homepage = "https://qiling.io/";
    license = licenses.gpl2Only;
    maintainers = teams.determinatesystems.members;
  };
}