about summary refs log tree commit diff
path: root/pkgs/by-name/qp
diff options
context:
space:
mode:
authorGuilhem Saurel <guilhem.saurel@laas.fr>2024-03-23 10:32:16 +0100
committerGuilhem Saurel <guilhem.saurel@laas.fr>2024-04-14 12:49:13 +0200
commit840f9efd770a30e7dd9d07981e5c9bb0c55d11be (patch)
tree53e740f719b1d259c1c3b6765fa7e87ae0f69942 /pkgs/by-name/qp
parentb5c54289bbcf1c8618ec87ec7074e45b30e38906 (diff)
qpoases: init at 3.2.1
Diffstat (limited to 'pkgs/by-name/qp')
-rw-r--r--pkgs/by-name/qp/qpoases/package.nix42
1 files changed, 42 insertions, 0 deletions
diff --git a/pkgs/by-name/qp/qpoases/package.nix b/pkgs/by-name/qp/qpoases/package.nix
new file mode 100644
index 0000000000000..5dec04c6aee7a
--- /dev/null
+++ b/pkgs/by-name/qp/qpoases/package.nix
@@ -0,0 +1,42 @@
+{
+  lib,
+  stdenv,
+  fetchFromGitHub,
+  fetchpatch,
+  cmake,
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "qpoases";
+  version = "3.2.1";
+
+  src = fetchFromGitHub {
+    owner = "coin-or";
+    repo = "qpOASES";
+    rev = "releases/${finalAttrs.version}";
+    hash = "sha256-NWKwKYdXJD8lGorhTFWJmYeIhSCO00GHiYx+zHEJk0M=";
+  };
+
+  patches = [
+    # Allow building as shared library.
+    # This was merged upstream, and can be removed on next version
+    (fetchpatch {
+      name = "shared-libs.patch";
+      url = "https://github.com/coin-or/qpOASES/pull/109/commits/cb49b52c17e0b638c88ff92f4c59e347cd82a332.patch";
+      hash = "sha256-6IoJHCFVCZpf3+Im1f64VwV5vj+bbbwCSF0vqpdd5Os=";
+    })
+  ];
+
+  nativeBuildInputs = [ cmake ];
+
+  cmakeFlags = [
+    "-DBUILD_SHARED_LIBS=ON"
+  ];
+
+  meta = with lib; {
+    description = "Open-source C++ implementation of the recently proposed online active set strategy";
+    homepage = "https://github.com/coin-or/qpOASES";
+    license = licenses.lgpl21;
+    maintainers = with maintainers; [ nim65s ];
+  };
+})