Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 pythonOlder, 6 flit-core, 7 z3-solver, 8 astroid, 9 pytestCheckHook, 10 hypothesis, 11}: 12 13buildPythonPackage rec { 14 pname = "deal-solver"; 15 version = "0.1.2"; 16 format = "pyproject"; 17 18 disabled = pythonOlder "3.7"; 19 20 src = fetchFromGitHub { 21 owner = "life4"; 22 repo = pname; 23 rev = "refs/tags/${version}"; 24 hash = "sha256-DAOeQLFR/JED32uJSW7W9+Xx5f1Et05W8Fp+Vm7sfZo="; 25 }; 26 27 nativeBuildInputs = [ 28 flit-core 29 ]; 30 31 # z3 does not provide a dist-info, so python-runtime-deps-check will fail 32 pythonRemoveDeps = [ "z3-solver" ]; 33 34 postPatch = '' 35 substituteInPlace pyproject.toml \ 36 --replace "\"--cov=deal_solver\"," "" \ 37 --replace "\"--cov-report=html\"," "" \ 38 --replace "\"--cov-report=xml\"," "" \ 39 --replace "\"--cov-report=term-missing:skip-covered\"," "" \ 40 --replace "\"--cov-fail-under=100\"," "" 41 ''; 42 43 propagatedBuildInputs = [ 44 z3-solver 45 astroid 46 ] ++ z3-solver.requiredPythonModules; 47 48 nativeCheckInputs = [ 49 pytestCheckHook 50 hypothesis 51 ]; 52 53 pythonImportsCheck = [ "deal_solver" ]; 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}