2020-01-27 19:33:31 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, cmake
|
|
|
|
, future
|
|
|
|
, numpy
|
2021-01-12 00:35:36 +00:00
|
|
|
, qdldl
|
2022-02-07 19:39:27 +00:00
|
|
|
, setuptools-scm
|
2020-01-27 19:33:31 +00:00
|
|
|
, scipy
|
2020-04-02 16:46:54 +01:00
|
|
|
# check inputs
|
2020-01-27 19:33:31 +00:00
|
|
|
, pytestCheckHook
|
2021-01-14 19:13:20 +00:00
|
|
|
, cvxopt
|
2020-01-27 19:33:31 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "osqp";
|
2022-01-14 00:58:36 +00:00
|
|
|
version = "0.6.2.post5";
|
2020-01-27 19:33:31 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-01-14 00:58:36 +00:00
|
|
|
sha256 = "b2fa17aae42a7ed498ec261b33f262bb4b3605e7e8464062159d9fae817f0d61";
|
2020-01-27 19:33:31 +00:00
|
|
|
};
|
|
|
|
|
2022-02-07 19:39:27 +00:00
|
|
|
SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake setuptools-scm ];
|
2020-01-27 19:33:31 +00:00
|
|
|
dontUseCmakeConfigure = true;
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
future
|
2020-04-02 16:46:54 +01:00
|
|
|
numpy
|
2021-01-12 00:35:36 +00:00
|
|
|
qdldl
|
2020-04-02 16:46:54 +01:00
|
|
|
scipy
|
2020-01-27 19:33:31 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "osqp" ];
|
2021-01-14 19:13:20 +00:00
|
|
|
checkInputs = [ pytestCheckHook cvxopt ];
|
2020-08-14 21:49:03 +01:00
|
|
|
disabledTests = [
|
|
|
|
"mkl_"
|
2021-01-12 00:35:36 +00:00
|
|
|
];
|
2020-01-27 19:33:31 +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/";
|
2020-04-02 16:46:54 +01:00
|
|
|
downloadPage = "https://github.com/oxfordcontrol/osqp-python/releases";
|
2020-01-27 19:33:31 +00:00
|
|
|
license = licenses.asl20;
|
2020-04-02 16:46:54 +01:00
|
|
|
maintainers = with maintainers; [ drewrisinger ];
|
2020-01-27 19:33:31 +00:00
|
|
|
};
|
|
|
|
}
|