nix-ros-overlay/distros/build-ros-package/default.nix

28 lines
882 B
Nix
Raw Normal View History

{ stdenv, lib, pythonPackages }:
{ buildType ? "catkin"
# Too difficult to fix all the problems with the tests in each package
, doCheck ? false
# ROS is sloppy with specifying build/runtime dependencies and
# buildPythonPackage turns on strictDeps by default
# FIXME: figure out a way to avoid this to eventually allow cross-compiling
, strictDeps ? false
, CXXFLAGS ? ""
2019-04-16 15:02:56 -04:00
, passthru ? {}
2019-03-21 00:23:14 -04:00
, ...
}@args:
(if buildType == "ament_python" then pythonPackages.buildPythonPackage
else stdenv.mkDerivation) (args // {
inherit doCheck strictDeps;
# Disable warnings that cause "Log limit exceeded" errors on Hydra in lots of
# packages that use Eigen
CXXFLAGS = CXXFLAGS + "-Wno-deprecated-declarations -Wno-deprecated-copy";
2019-04-16 15:02:56 -04:00
passthru = passthru // {
rosPackage = true;
};
2020-03-04 17:18:10 -05:00
} // lib.optionalAttrs (buildType == "ament_python") {
dontUseCmakeConfigure = true;
2020-03-04 17:18:10 -05:00
})