Files
nixpkgs/pkgs/development/python-modules/deal-solver/default.nix
Connor Nelson 3a2c40c867 python3Packages.deal-solver: keep z3-solver dependency metadata
Use the z3-solver distribution metadata now supplied by Z3.
Remove the workaround that deleted the upstream dependency from Python metadata.

Assisted-by: OpenAI Codex (GPT-6)
2026-10-29 01:06:28 +00:00

60 lines
1.2 KiB
Nix

{
lib,
astroid,
buildPythonPackage,
fetchFromGitHub,
flit-core,
hypothesis,
pytest-cov-stub,
pytest-xdist,
pytestCheckHook,
z3-solver,
}:
buildPythonPackage rec {
pname = "deal-solver";
version = "0.1.2";
pyproject = true;
src = fetchFromGitHub {
owner = "life4";
repo = "deal-solver";
tag = version;
hash = "sha256-DAOeQLFR/JED32uJSW7W9+Xx5f1Et05W8Fp+Vm7sfZo=";
};
build-system = [ flit-core ];
dependencies = [
z3-solver
astroid
]
++ z3-solver.requiredPythonModules;
nativeCheckInputs = [
hypothesis
pytest-cov-stub
pytest-xdist
pytestCheckHook
];
pythonImportsCheck = [ "deal_solver" ];
disabledTests = [
# Flaky tests, sometimes it works sometimes it doesn't
"test_expr_asserts_ok"
"test_fuzz_math_floats"
"test_model_skip_helpers2"
# test does not pass on python314 because an error message has changed
"test_type_error__table"
];
meta = {
description = "Z3-powered solver (theorem prover) for deal";
homepage = "https://github.com/life4/deal-solver";
changelog = "https://github.com/life4/deal-solver/releases/tag/${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ gador ];
};
}