Files
nixpkgs/pkgs/by-name/cr/crocoddyl/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

88 lines
1.7 KiB
Nix

{
blas,
cmake,
doxygen,
example-robot-data,
fetchFromGitHub,
ipopt,
lapack,
lib,
pinocchio,
pkg-config,
pythonSupport ? false,
python3Packages,
stdenv,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "crocoddyl";
version = "3.0.1";
src = fetchFromGitHub {
owner = "loco-3d";
repo = "crocoddyl";
tag = "v${finalAttrs.version}";
hash = "sha256-eUH9fMhuIUp5kuDKNo4B8iJ3JlMIqv7wX6meOpyPTJk=";
};
outputs = [
"out"
"doc"
];
strictDeps = true;
nativeBuildInputs = [
cmake
doxygen
pkg-config
]
++ lib.optionals pythonSupport [
python3Packages.python
python3Packages.pythonImportsCheckHook
];
propagatedBuildInputs = [
blas
ipopt
lapack
]
++ lib.optionals (!pythonSupport) [
example-robot-data
pinocchio
]
++ lib.optionals pythonSupport [
python3Packages.example-robot-data
python3Packages.pinocchio
python3Packages.scipy
];
cmakeFlags = [
(lib.cmakeBool "INSTALL_DOCUMENTATION" true)
(lib.cmakeBool "BUILD_EXAMPLES" pythonSupport)
(lib.cmakeBool "BUILD_PYTHON_INTERFACE" pythonSupport)
];
prePatch = ''
substituteInPlace \
examples/CMakeLists.txt \
examples/log/check_logfiles.sh \
--replace-fail /bin/bash ${stdenv.shell}
'';
doCheck = true;
pythonImportsCheck = [ "crocoddyl" ];
checkInputs = lib.optionals pythonSupport [ python3Packages.scipy ];
meta = with lib; {
description = "Crocoddyl optimal control library";
homepage = "https://github.com/loco-3d/crocoddyl";
license = licenses.bsd3;
maintainers = with maintainers; [
nim65s
wegank
];
platforms = platforms.unix;
};
})