diff options
| author | Sharlatan Hellseher <sharlatanus@gmail.com> | 2026-01-02 11:44:55 +0000 |
|---|---|---|
| committer | Rutherther <rutherther@ditigal.xyz> | 2026-01-25 21:20:08 +0100 |
| commit | 4b685e21c445fcc674e2f59865e21dbe5b8bb327 (patch) | |
| tree | 73705adfcfce7e44d22bc468bf8988454445b1ee /gnu/packages/maths.scm | |
| parent | 62d54203dc96486a6d3098b947cee8666a0eca0a (diff) | |
gnu: Add osqp.
* gnu/packages/maths.scm (osqp): New variable.
Change-Id: If2eded2af7fa7060e793867f1128210e3b8f2ed1
Signed-off-by: Rutherther <rutherther@ditigal.xyz>
Diffstat (limited to 'gnu/packages/maths.scm')
| -rw-r--r-- | gnu/packages/maths.scm | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index a5b7c18f3b7..de0a851fc86 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -6456,6 +6456,67 @@ Fresnel integrals, and similar related functions as well.") ;; public domain software. (license (list license:expat license:public-domain)))) +(define-public osqp + (package + (name "osqp") + (version "1.0.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/osqp/osqp") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "15n86mc232m04w8n38fx3pqam4y0swx7hcy4klhch7bk6avk5q04")))) + (build-system cmake-build-system) + (arguments + (list + #:configure-flags + #~(list "-DOSQP_BUILD_UNITTESTS=ON" + "-DOSQP_BUILD_SHARED_LIB=ON") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'fix-qdldl-source-location + (lambda _ + (substitute* "algebra/_common/lin_sys/qdldl/qdldl.cmake" + (("Fetching/configuring QDLDL solver") + (format #f "Adding/configuring QDLDL solver from: ~a" + #$(package-source + (this-package-native-input "qdldl")))) + (("GIT_REPOSITORY https://github.com/osqp/qdldl\\.git") + (format #f "SOURCE_DIR ~a" + #$(package-source + (this-package-native-input "qdldl")))) + (("GIT_TAG v0.1.8") + "")))) + (add-after 'unpack 'fix-catch2-source-location + (lambda _ + (substitute* "tests/CMakeLists.txt" + (("GIT_REPOSITORY https://github.com/catchorg/Catch2\\.git") + (format #f "SOURCE_DIR ~a" + #$(package-source + (this-package-native-input "catch2")))) + (("GIT_TAG v2.13.6") + ""))))))) + (native-inputs + (list catch2 + python-wrapper ;You need python installed to generate unittests. + python-numpy ;You need numpy ... + python-scipy ;You need scipy ... + qdldl)) + (home-page "https://osqp.org/") + (synopsis "Operator Splitting QP Solver") + (description + "The OSQP (Operator Splitting Quadratic Program) solver is a numerical +optimization package for solving convex quadratic programs. + +It uses a custom ADMM-based first-order method requiring only a single matrix +factorization in the setup phase. All the other operations are extremely +cheap. It also implements custom sparse linear algebra routines exploiting +structures in the problem data.") + (license license:asl2.0))) + (define %suitesparse-package-versions '(("AMD" . "3.3.3") ("BTF" . "2.3.2") |
