mim-solvers: init at 0.0.5
Co-authored-by: Arne Keller <2012gdwu+github@posteo.de>
This commit is contained in:
co-authored by
Arne Keller
parent
9357f4f237
commit
f2800a6eb3
@@ -0,0 +1,68 @@
|
||||
{
|
||||
cmake,
|
||||
crocoddyl,
|
||||
fetchFromGitHub,
|
||||
lib,
|
||||
llvmPackages,
|
||||
pkg-config,
|
||||
proxsuite,
|
||||
python3Packages,
|
||||
pythonSupport ? false,
|
||||
stdenv,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "mim-solvers";
|
||||
version = "0.0.5";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "machines-in-motion";
|
||||
repo = "mim_solvers";
|
||||
rev = "v${finalAttrs.version}";
|
||||
hash = "sha256-XV8EJqCOTYqljZe2PQvnhIaPUOJ+bBjRIoshdeqZycA=";
|
||||
};
|
||||
|
||||
# eigenpy is not used without python support
|
||||
postPatch = lib.optionalString (!pythonSupport) ''
|
||||
substituteInPlace CMakeLists.txt --replace-fail \
|
||||
"add_project_dependency(eigenpy 2.7.10 REQUIRED)" \
|
||||
""
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
pkg-config
|
||||
] ++ lib.optional pythonSupport python3Packages.pythonImportsCheckHook;
|
||||
buildInputs = lib.optional stdenv.hostPlatform.isDarwin llvmPackages.openmp;
|
||||
propagatedBuildInputs =
|
||||
lib.optionals pythonSupport [
|
||||
python3Packages.crocoddyl
|
||||
python3Packages.osqp
|
||||
python3Packages.proxsuite
|
||||
python3Packages.scipy
|
||||
]
|
||||
++ lib.optionals (!pythonSupport) [
|
||||
crocoddyl
|
||||
proxsuite
|
||||
];
|
||||
|
||||
cmakeFlags =
|
||||
[
|
||||
(lib.cmakeBool "BUILD_PYTHON_INTERFACE" pythonSupport)
|
||||
(lib.cmakeBool "BUILD_WITH_PROXSUITE" true)
|
||||
]
|
||||
++ lib.optional (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) (
|
||||
lib.cmakeFeature "CMAKE_CTEST_ARGUMENTS" "--exclude-regex;'test_solvers'"
|
||||
);
|
||||
|
||||
doCheck = true;
|
||||
pythonImportsCheck = [ "mim_solvers" ];
|
||||
|
||||
meta = {
|
||||
description = "Numerical solvers used in the Machines in Motion Laboratory";
|
||||
homepage = "https://github.com/machines-in-motion/mim_solvers";
|
||||
license = lib.licenses.bsd3;
|
||||
maintainers = with lib.maintainers; [ nim65s ];
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
})
|
||||
@@ -7870,6 +7870,11 @@ self: super: with self; {
|
||||
|
||||
millheater = callPackage ../development/python-modules/millheater { };
|
||||
|
||||
mim-solvers = toPythonModule (pkgs.mim-solvers.override {
|
||||
python3Packages = self;
|
||||
pythonSupport = true;
|
||||
});
|
||||
|
||||
minari = callPackage ../development/python-modules/minari { };
|
||||
|
||||
mindsdb-evaluator = callPackage ../development/python-modules/mindsdb-evaluator { };
|
||||
|
||||
Reference in New Issue
Block a user