2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
cmake,
|
|
|
|
cvxopt,
|
|
|
|
fetchPypi,
|
|
|
|
future,
|
|
|
|
numpy,
|
|
|
|
oldest-supported-numpy,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
qdldl,
|
|
|
|
scipy,
|
|
|
|
setuptools-scm,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "osqp";
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "0.6.7";
|
2024-02-07 01:22:34 +00:00
|
|
|
pyproject = true;
|
2022-10-30 15:09:59 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-06-05 15:53:02 +00:00
|
|
|
hash = "sha256-O3ARmFV6SZxg67U9fyUBkGSFXHMvTz+84gVdeJ5Tph0=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
dontUseCmakeConfigure = true;
|
|
|
|
|
2022-10-30 15:09:59 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
2024-02-07 01:22:34 +00:00
|
|
|
oldest-supported-numpy
|
2022-10-30 15:09:59 +00:00
|
|
|
setuptools-scm
|
2024-04-21 15:54:59 +00:00
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonRelaxDeps = [ "scipy" ];
|
2022-10-30 15:09:59 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
future
|
|
|
|
numpy
|
2021-01-15 22:18:51 +00:00
|
|
|
qdldl
|
2020-04-24 23:36:52 +00:00
|
|
|
scipy
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-10-30 15:09:59 +00:00
|
|
|
cvxopt
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "osqp" ];
|
2022-10-30 15:09:59 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
disabledTests =
|
|
|
|
[
|
|
|
|
# Need an unfree license package - mkl
|
|
|
|
"test_issue14"
|
|
|
|
]
|
|
|
|
# disable tests failing after scipy 1.12 update
|
|
|
|
# https://github.com/osqp/osqp-python/issues/121
|
|
|
|
# re-enable once unit tests fixed
|
|
|
|
++ [
|
|
|
|
"feasibility_tests"
|
|
|
|
"polish_tests"
|
|
|
|
"update_matrices_tests"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Operator Splitting QP Solver";
|
2020-04-24 23:36:52 +00:00
|
|
|
longDescription = ''
|
|
|
|
Numerical optimization package for solving problems in the form
|
|
|
|
minimize 0.5 x' P x + q' x
|
|
|
|
subject to l <= A x <= u
|
|
|
|
|
|
|
|
where x in R^n is the optimization variable
|
|
|
|
'';
|
|
|
|
homepage = "https://osqp.org/";
|
|
|
|
downloadPage = "https://github.com/oxfordcontrol/osqp-python/releases";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ drewrisinger ];
|
|
|
|
};
|
|
|
|
}
|