2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, cmake
|
|
|
|
, future
|
|
|
|
, numpy
|
2021-01-15 22:18:51 +00:00
|
|
|
, qdldl
|
2020-04-24 23:36:52 +00:00
|
|
|
, scipy
|
|
|
|
# check inputs
|
|
|
|
, pytestCheckHook
|
2021-01-15 22:18:51 +00:00
|
|
|
, cvxopt
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "osqp";
|
2021-01-15 22:18:51 +00:00
|
|
|
version = "0.6.2.post0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-01-15 22:18:51 +00:00
|
|
|
sha256 = "5f0695f26a3bef0fae91254bc283fab790dcca0064bfe0f425167f9c9e8b4cbc";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
dontUseCmakeConfigure = true;
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
future
|
|
|
|
numpy
|
2021-01-15 22:18:51 +00:00
|
|
|
qdldl
|
2020-04-24 23:36:52 +00:00
|
|
|
scipy
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "osqp" ];
|
2021-01-15 22:18:51 +00:00
|
|
|
checkInputs = [ pytestCheckHook cvxopt ];
|
2020-08-20 17:08:02 +00:00
|
|
|
disabledTests = [
|
|
|
|
"mkl_"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "The Operator Splitting QP Solver";
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|