11 llvmPackages, # llvm/Support/Host.h required by casadi 3.6.5 and not available in llvm 18
16 pythonSupport ? false,
21 stdenv.mkDerivation (finalAttrs: {
25 src = fetchFromGitHub {
26 owner = "Simple-Robotics";
28 rev = "v${finalAttrs.version}";
29 hash = "sha256-o4QjxTaZUa17hZsCv4hCI2cedaHoojBtLe8SVUkl0bo=";
44 ] ++ lib.optional pythonSupport python3Packages.pythonImportsCheckHook;
45 buildInputs = [ fmt ] ++ lib.optional stdenv.hostPlatform.isDarwin llvmPackages.openmp;
46 propagatedBuildInputs =
48 ++ lib.optionals pythonSupport [
49 python3Packages.crocoddyl
50 python3Packages.matplotlib
51 python3Packages.pinocchio
52 python3Packages.proxsuite-nlp
54 ++ lib.optionals (!pythonSupport) [
61 ++ lib.optionals pythonSupport [
62 python3Packages.matplotlib
63 python3Packages.pytest
68 (lib.cmakeBool "BUILD_PYTHON_INTERFACE" pythonSupport)
69 (lib.cmakeBool "BUILD_WITH_PINOCCHIO_SUPPORT" true)
70 (lib.cmakeBool "BUILD_CROCODDYL_COMPAT" true)
71 (lib.cmakeBool "BUILD_WITH_OPENMP_SUPPORT" true)
72 (lib.cmakeBool "BUILD_WITH_CHOLMOD_SUPPORT" true)
73 (lib.cmakeBool "GENERATE_PYTHON_STUBS" false) # this need git at configure time
75 ++ lib.optionals (stdenv.hostPlatform.isDarwin && pythonSupport) [
76 # ignore one failing test for now
77 (lib.cmakeFeature "CMAKE_CTEST_ARGUMENTS" "--exclude-regex;aligator-test-py-integrators")
80 # Fontconfig error: Cannot load default config file: No such file: (null)
81 env.FONTCONFIG_FILE = "${fontconfig.out}/etc/fonts/fonts.conf";
83 # Fontconfig error: No writable cache directories
84 preBuild = "export XDG_CACHE_HOME=$(mktemp -d)";
87 pythonImportsCheck = [ "aligator" ];
90 description = "Versatile and efficient framework for constrained trajectory optimization";
91 homepage = "https://github.com/Simple-Robotics/aligator";
92 changelog = "https://github.com/Simple-Robotics/aligator/blob/v${finalAttrs.version}/CHANGELOG.md";
93 license = lib.licenses.bsd2;
94 maintainers = with lib.maintainers; [ nim65s ];
95 platforms = lib.platforms.unix;