2021-02-08 22:14:13 +01:00
|
|
|
{ lib
|
2021-02-24 23:50:38 +01:00
|
|
|
, stdenv
|
2021-02-08 22:14:13 +01:00
|
|
|
, archinfo
|
|
|
|
, bitstring
|
|
|
|
, buildPythonPackage
|
2021-04-06 16:26:47 +02:00
|
|
|
, cffi
|
|
|
|
, fetchPypi
|
2021-02-08 22:14:13 +01:00
|
|
|
, future
|
|
|
|
, pycparser
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyvex";
|
2021-04-27 22:08:15 +02:00
|
|
|
version = "9.0.6885";
|
2021-02-08 22:14:13 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-04-27 22:08:15 +02:00
|
|
|
sha256 = "sha256-cWQdrGKJyGieBow3TiMj/uB2crIF32Kvl5tVUKg/z+E=";
|
2021-02-08 22:14:13 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
archinfo
|
|
|
|
bitstring
|
|
|
|
cffi
|
|
|
|
future
|
|
|
|
pycparser
|
|
|
|
];
|
|
|
|
|
2021-04-22 00:47:23 +02:00
|
|
|
preBuild = ''
|
|
|
|
export CC=${stdenv.cc.targetPrefix}cc
|
2021-05-08 00:00:04 +02:00
|
|
|
substituteInPlace pyvex_c/Makefile --replace 'AR=ar' 'AR=${stdenv.cc.targetPrefix}ar'
|
2021-04-06 16:26:47 +02:00
|
|
|
'';
|
|
|
|
|
2021-02-08 22:14:13 +01:00
|
|
|
# No tests are available on PyPI, GitHub release has tests
|
|
|
|
# Switch to GitHub release after all angr parts are present
|
|
|
|
doCheck = false;
|
|
|
|
pythonImportsCheck = [ "pyvex" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python interface to libVEX and VEX IR";
|
|
|
|
homepage = "https://github.com/angr/pyvex";
|
|
|
|
license = with licenses; [ bsd2 gpl3Plus lgpl3Plus ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
2021-02-24 23:50:38 +01:00
|
|
|
# ERROR: pyvex-X-py3-none-manylinux1_aarch64.whl is not a supported wheel on this platform.
|
|
|
|
broken = stdenv.isAarch64;
|
2021-02-08 22:14:13 +01:00
|
|
|
};
|
|
|
|
}
|