2021-04-25 03:57:28 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, capstone
|
2021-12-06 16:07:01 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, fetchPypi
|
|
|
|
, gevent
|
2021-04-25 03:57:28 +00:00
|
|
|
, keystone-engine
|
2021-12-06 16:07:01 +00:00
|
|
|
, multiprocess
|
|
|
|
, pefile
|
2021-04-25 03:57:28 +00:00
|
|
|
, pyelftools
|
2021-12-06 16:07:01 +00:00
|
|
|
, python-registry
|
|
|
|
, unicorn
|
2021-04-25 03:57:28 +00:00
|
|
|
}:
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2021-04-25 03:57:28 +00:00
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "qiling";
|
2022-02-10 20:34:41 +00:00
|
|
|
version = "1.4.1";
|
2021-12-06 16:07:01 +00:00
|
|
|
format = "setuptools";
|
2021-04-25 03:57:28 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-02-10 20:34:41 +00:00
|
|
|
sha256 = "e72dc5856cbda975f962ddf063063a32bd6c3b825f75e0795e94ba6840a7d45f";
|
2021-04-25 03:57:28 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
capstone
|
2021-12-06 16:07:01 +00:00
|
|
|
gevent
|
2021-04-25 03:57:28 +00:00
|
|
|
keystone-engine
|
2021-12-06 16:07:01 +00:00
|
|
|
multiprocess
|
|
|
|
pefile
|
2021-04-25 03:57:28 +00:00
|
|
|
pyelftools
|
2021-12-06 16:07:01 +00:00
|
|
|
python-registry
|
|
|
|
unicorn
|
2021-04-25 03:57:28 +00:00
|
|
|
];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "pefile==2021.5.24" "pefile>=2021.5.24"
|
|
|
|
'';
|
|
|
|
|
2021-04-25 03:57:28 +00:00
|
|
|
# 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;
|
|
|
|
};
|
|
|
|
}
|