diff options
-rw-r--r-- | pkgs/development/python-modules/highspy/default.nix | 45 | ||||
-rw-r--r-- | pkgs/development/python-modules/qpsolvers/default.nix | 6 | ||||
-rw-r--r-- | pkgs/top-level/python-packages.nix | 2 |
3 files changed, 51 insertions, 2 deletions
diff --git a/pkgs/development/python-modules/highspy/default.nix b/pkgs/development/python-modules/highspy/default.nix new file mode 100644 index 000000000000..6d1847d100dd --- /dev/null +++ b/pkgs/development/python-modules/highspy/default.nix @@ -0,0 +1,45 @@ +{ + lib, + buildPythonPackage, + pytestCheckHook, + pythonOlder, + scikit-build-core, + pybind11, + numpy, + cmake, + ninja, + pathspec, + highs, +}: +buildPythonPackage { + pname = "highspy"; + version = highs.version; + pyproject = true; + + disabled = pythonOlder "3.8"; + + inherit (highs) src; + + build-system = [ + cmake + ninja + pathspec + scikit-build-core + pybind11 + ]; + + dontUseCmakeConfigure = true; + + dependencies = [ numpy ]; + + pythonImportsCheck = [ "highspy" ]; + + nativeCheckInputs = [ pytestCheckHook ]; + + meta = with lib; { + description = "Linear optimization software"; + homepage = "https://github.com/ERGO-Code/HiGHS"; + license = licenses.mit; + maintainers = with maintainers; [ renesat ]; + }; +} diff --git a/pkgs/development/python-modules/qpsolvers/default.nix b/pkgs/development/python-modules/qpsolvers/default.nix index af4bdcacb252..468099e7b59e 100644 --- a/pkgs/development/python-modules/qpsolvers/default.nix +++ b/pkgs/development/python-modules/qpsolvers/default.nix @@ -16,6 +16,7 @@ osqp, quadprog, scs, + highspy, }: buildPythonPackage rec { pname = "qpsolvers"; @@ -45,7 +46,7 @@ buildPythonPackage rec { daqp = [ daqp ]; ecos = [ ecos ]; gurobi = [ gurobipy ]; - # highs = [ highspy ]; + highs = [ highspy ]; # mosek = [ cvxopt mosek ]; osqp = [ osqp ]; # piqp = [ piqp ]; @@ -59,8 +60,9 @@ buildPythonPackage rec { clarabel cvxopt daqp - ecos # highs osqp # piqp proxqp qpalm + ecos + highs quadprog scs ]; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 7010d1d8a410..b0fd485b0fbf 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5545,6 +5545,8 @@ self: super: with self; { highdicom = callPackage ../development/python-modules/highdicom { }; + highspy = callPackage ../development/python-modules/highspy { }; + hid = callPackage ../development/python-modules/hid { inherit (pkgs) hidapi; }; |