1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
{
lib,
stdenv,
fetchFromGitHub,
buildPythonPackage,
unittestCheckHook,
flit-core,
numpy,
scipy,
# optional dependencies
clarabel,
cvxopt,
daqp,
ecos,
gurobipy,
osqp,
quadprog,
scs,
}:
buildPythonPackage rec {
pname = "qpsolvers";
version = "4.3.2";
pyproject = true;
src = fetchFromGitHub {
owner = "qpsolvers";
repo = "qpsolvers";
rev = "refs/tags/v${version}";
hash = "sha256-EU7/OGLeOIHw7wyNTibMmHZLAiRTCUFwjEaVNsHg1vw=";
};
nativeBuildInputs = [ flit-core ];
pythonImportsCheck = [ "qpsolvers" ];
propagatedBuildInputs = [
numpy
scipy
];
passthru.optional-dependencies = {
# FIXME commented out solvers have not been packaged yet
clarabel = [ clarabel ];
cvxopt = [ cvxopt ];
daqp = [ daqp ];
ecos = [ ecos ];
gurobi = [ gurobipy ];
# highs = [ highspy ];
# mosek = [ cvxopt mosek ];
osqp = [ osqp ];
# piqp = [ piqp ];
# proxqp = [ proxsuite ];
# qpalm = [ qpalm ];
quadprog = [ quadprog ];
scs = [ scs ];
open_source_solvers =
with passthru.optional-dependencies;
lib.flatten [
clarabel
cvxopt
daqp
ecos # highs
osqp # piqp proxqp qpalm
quadprog
scs
];
};
nativeCheckInputs = [ unittestCheckHook ] ++ passthru.optional-dependencies.open_source_solvers;
meta = with lib; {
changelog = "https://github.com/qpsolvers/qpsolvers/blob/${src.rev}/CHANGELOG.md";
description = "Quadratic programming solvers in Python with a unified API";
homepage = "https://github.com/qpsolvers/qpsolvers";
license = licenses.lgpl3Plus;
maintainers = with maintainers; [ renesat ];
};
}
|