1{ lib
2, buildPythonPackage
3, setuptools
4, cachetools
5, decorator
6, fetchFromGitHub
7, future
8, pysmt
9, pythonOlder
10, pytestCheckHook
11, z3
12}:
13
14buildPythonPackage rec {
15 pname = "claripy";
16 version = "9.2.53";
17 format = "pyproject";
18
19 disabled = pythonOlder "3.8";
20
21 src = fetchFromGitHub {
22 owner = "angr";
23 repo = pname;
24 rev = "refs/tags/v${version}";
25 hash = "sha256-ufS/xGEnyXOzFevONsaFHyHNvPnEKvkJ5NkDpnWuMT8=";
26 };
27
28 nativeBuildInputs = [
29 setuptools
30 ];
31
32 propagatedBuildInputs = [
33 cachetools
34 decorator
35 future
36 pysmt
37 z3
38 ];
39
40 nativeCheckInputs = [
41 pytestCheckHook
42 ];
43
44 postPatch = ''
45 # Use upstream z3 implementation
46 substituteInPlace setup.cfg \
47 --replace "z3-solver==4.10.2.0" ""
48 '';
49
50 pythonImportsCheck = [
51 "claripy"
52 ];
53
54 meta = with lib; {
55 description = "Python abstraction layer for constraint solvers";
56 homepage = "https://github.com/angr/claripy";
57 license = with licenses; [ bsd2 ];
58 maintainers = with maintainers; [ fab ];
59 };
60}