2021-02-13 14:23:35 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2022-09-30 11:47:45 +00:00
|
|
|
, setuptools
|
2021-02-13 14:23:35 +00:00
|
|
|
, cachetools
|
|
|
|
, decorator
|
|
|
|
, fetchFromGitHub
|
|
|
|
, future
|
|
|
|
, nose
|
|
|
|
, pysmt
|
|
|
|
, pythonOlder
|
|
|
|
, pytestCheckHook
|
2022-04-27 09:35:20 +00:00
|
|
|
, six
|
2021-02-13 14:23:35 +00:00
|
|
|
, z3
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "claripy";
|
2022-12-02 08:20:57 +00:00
|
|
|
version = "9.2.27";
|
2022-04-27 09:35:20 +00:00
|
|
|
format = "pyproject";
|
2022-01-19 23:45:15 +00:00
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2021-02-13 14:23:35 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "angr";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-12-02 08:20:57 +00:00
|
|
|
hash = "sha256-7tn/OdPNUnbF2T0wASCBfuTZ0zI1j8GY5kh0QwbzS+8=";
|
2021-02-13 14:23:35 +00:00
|
|
|
};
|
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2021-02-13 14:23:35 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
cachetools
|
|
|
|
decorator
|
|
|
|
future
|
|
|
|
pysmt
|
|
|
|
z3
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
nose
|
|
|
|
pytestCheckHook
|
2022-04-27 09:35:20 +00:00
|
|
|
six
|
2021-02-13 14:23:35 +00:00
|
|
|
];
|
|
|
|
|
2022-01-19 23:45:15 +00:00
|
|
|
postPatch = ''
|
|
|
|
# Use upstream z3 implementation
|
2022-04-27 09:35:20 +00:00
|
|
|
substituteInPlace setup.cfg \
|
2022-09-09 14:08:57 +00:00
|
|
|
--replace "z3-solver == 4.10.2.0" ""
|
2022-01-19 23:45:15 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"claripy"
|
|
|
|
];
|
2021-02-13 14:23:35 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python abstraction layer for constraint solvers";
|
|
|
|
homepage = "https://github.com/angr/claripy";
|
|
|
|
license = with licenses; [ bsd2 ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|