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 ] ++ z3-solver.requiredPythonModules; 38 39 nativeCheckInputs = [ 40 hypothesis 41 pytest-cov-stub 42 pytest-xdist 43 pytestCheckHook 44 ]; 45 46 pythonImportsCheck = [ "deal_solver" ]; 47 48 disabledTests = [ 49 # Flaky tests, sometimes it works sometimes it doesn't 50 "test_expr_asserts_ok" 51 "test_fuzz_math_floats" 52 ]; 53 54 meta = with lib; { 55 description = "Z3-powered solver (theorem prover) for deal"; 56 homepage = "https://github.com/life4/deal-solver"; 57 changelog = "https://github.com/life4/deal-solver/releases/tag/${version}"; 58 license = licenses.mit; 59 maintainers = with maintainers; [ gador ]; 60 }; 61}