1{ 2 lib, 3 astroid, 4 buildPythonPackage, 5 fetchFromGitHub, 6 flit-core, 7 hypothesis, 8 pytest-cov-stub, 9 pytest-xdist, 10 pytestCheckHook, 11 pythonOlder, 12 z3-solver, 13}: 14 15buildPythonPackage rec { 16 pname = "deal-solver"; 17 version = "0.1.2"; 18 pyproject = true; 19 20 disabled = pythonOlder "3.7"; 21 22 src = fetchFromGitHub { 23 owner = "life4"; 24 repo = "deal-solver"; 25 tag = version; 26 hash = "sha256-DAOeQLFR/JED32uJSW7W9+Xx5f1Et05W8Fp+Vm7sfZo="; 27 }; 28 29 build-system = [ flit-core ]; 30 31 # z3 does not provide a dist-info, so python-runtime-deps-check will fail 32 pythonRemoveDeps = [ "z3-solver" ]; 33 34 dependencies = [ 35 z3-solver 36 astroid 37 ] 38 ++ z3-solver.requiredPythonModules; 39 40 nativeCheckInputs = [ 41 hypothesis 42 pytest-cov-stub 43 pytest-xdist 44 pytestCheckHook 45 ]; 46 47 pythonImportsCheck = [ "deal_solver" ]; 48 49 disabledTests = [ 50 # Flaky tests, sometimes it works sometimes it doesn't 51 "test_expr_asserts_ok" 52 "test_fuzz_math_floats" 53 ]; 54 55 meta = with lib; { 56 description = "Z3-powered solver (theorem prover) for deal"; 57 homepage = "https://github.com/life4/deal-solver"; 58 changelog = "https://github.com/life4/deal-solver/releases/tag/${version}"; 59 license = licenses.mit; 60 maintainers = with maintainers; [ gador ]; 61 }; 62}