qpoases: clean

This commit is contained in:
Guilhem Saurel
2025-08-31 19:01:27 +02:00
parent 578f8e099f
commit c8d7ba717c
+15 -14
View File
@@ -1,9 +1,13 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
nix-update-script,
cmake,
withShared ? (!stdenv.hostPlatform.isStatic),
}:
stdenv.mkDerivation (finalAttrs: {
@@ -13,30 +17,27 @@ stdenv.mkDerivation (finalAttrs: {
src = fetchFromGitHub {
owner = "coin-or";
repo = "qpOASES";
rev = "releases/${finalAttrs.version}";
tag = "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"
(lib.cmakeBool "BUILD_SHARED_LIBS" withShared)
];
passthru.updateScript = nix-update-script {
extraArgs = [
"--version-regex"
"releases/(.*)"
];
};
meta = with lib; {
description = "Open-source C++ implementation of the recently proposed online active set strategy";
homepage = "https://github.com/coin-or/qpOASES";
changelog = "https://github.com/coin-or/qpOASES/blob/${finalAttrs.src.rev}/VERSIONS.txt";
changelog = "https://github.com/coin-or/qpOASES/blob/${finalAttrs.src.tag}/VERSIONS.txt";
license = licenses.lgpl21;
maintainers = with maintainers; [ nim65s ];
};