24 useOpenmp ? (!stdenv.hostPlatform.isDarwin),
27 buildPythonPackage rec {
32 disabled = pythonOlder "3.9";
34 src = fetchFromGitHub {
37 rev = "refs/tags/v${version}";
38 hash = "sha256-6RaEyFckvF3WhbfeffysMB/zt+aU1NU6B7Nm06znt9k=";
41 # we need to patch out numpy version caps from upstream
43 substituteInPlace pyproject.toml \
44 --replace-fail "numpy >= 2.0.0" "numpy"
63 nativeCheckInputs = [ pytestCheckHook ];
65 # Required flags from https://github.com/cvxpy/cvxpy/releases/tag/v1.1.11
66 preBuild = lib.optionalString useOpenmp ''
67 export CFLAGS="-fopenmp"
68 export LDFLAGS="-lgomp"
71 pytestFlagsArray = [ "cvxpy" ];
74 # Disable the slowest benchmarking tests, cuts test time in half
76 "test_diffcp_sdp_example"
78 "test_partial_problem"
81 pythonImportsCheck = [ "cvxpy" ];
84 description = "Domain-specific language for modeling convex optimization problems in Python";
85 homepage = "https://www.cvxpy.org/";
86 downloadPage = "https://github.com/cvxpy/cvxpy//releases";
87 changelog = "https://github.com/cvxpy/cvxpy/releases/tag/v${version}";
88 license = lib.licenses.asl20;
89 maintainers = with lib.maintainers; [ drewrisinger ];