ocamlPackages.hxd: 0.3.2 -> 0.3.3 (#364231)
[NixPkgs.git] / pkgs / by-name / al / aligator / package.nix
blobe7cb03a8771efd81350585b46a0d49adbded9e4c
2   cmake,
3   crocoddyl,
4   doxygen,
5   fetchFromGitHub,
6   fmt,
7   fontconfig,
8   gbenchmark,
9   graphviz,
10   lib,
11   llvmPackages, # llvm/Support/Host.h required by casadi 3.6.5 and not available in llvm 18
12   pinocchio,
13   pkg-config,
14   proxsuite-nlp,
15   python3Packages,
16   pythonSupport ? false,
17   stdenv,
18   suitesparse,
21 stdenv.mkDerivation (finalAttrs: {
22   pname = "aligator";
23   version = "0.8.0";
25   src = fetchFromGitHub {
26     owner = "Simple-Robotics";
27     repo = "aligator";
28     rev = "v${finalAttrs.version}";
29     hash = "sha256-o4QjxTaZUa17hZsCv4hCI2cedaHoojBtLe8SVUkl0bo=";
30   };
32   outputs = [
33     "doc"
34     "out"
35   ];
37   strictDeps = true;
39   nativeBuildInputs = [
40     doxygen
41     cmake
42     graphviz
43     pkg-config
44   ] ++ lib.optional pythonSupport python3Packages.pythonImportsCheckHook;
45   buildInputs = [ fmt ] ++ lib.optional stdenv.hostPlatform.isDarwin llvmPackages.openmp;
46   propagatedBuildInputs =
47     [ suitesparse ]
48     ++ lib.optionals pythonSupport [
49       python3Packages.crocoddyl
50       python3Packages.matplotlib
51       python3Packages.pinocchio
52       python3Packages.proxsuite-nlp
53     ]
54     ++ lib.optionals (!pythonSupport) [
55       crocoddyl
56       pinocchio
57       proxsuite-nlp
58     ];
59   checkInputs =
60     [ gbenchmark ]
61     ++ lib.optionals pythonSupport [
62       python3Packages.matplotlib
63       python3Packages.pytest
64     ];
66   cmakeFlags =
67     [
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
74     ]
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")
78     ];
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)";
86   doCheck = true;
87   pythonImportsCheck = [ "aligator" ];
89   meta = {
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;
96   };