2019-09-05 22:43:33 -04:00
|
|
|
{ stdenv, lib, pythonPackages }:
|
|
|
|
{ buildType ? "catkin"
|
2020-08-24 18:28:26 -04:00
|
|
|
# Too difficult to fix all the problems with the tests in each package
|
|
|
|
, doCheck ? false
|
2021-03-12 00:31:00 -05:00
|
|
|
# nixpkgs requires that either dontWrapQtApps is set or wrapQtAppsHook is added
|
|
|
|
# to nativeBuildInputs if a package depends on Qt5. This is difficult to achieve
|
|
|
|
# with auto-generated packages, so we just always disable wrapping except for
|
|
|
|
# packages that are overridden in distro-overlay.nix. This means some Qt5
|
|
|
|
# applications are broken, but allows all libraries that depend on Qt5 to build
|
|
|
|
# correctly.
|
|
|
|
, dontWrapQtApps ? true
|
2020-08-24 18:28:26 -04:00
|
|
|
, CXXFLAGS ? ""
|
2019-04-16 15:02:56 -04:00
|
|
|
, passthru ? {}
|
2019-03-21 00:23:14 -04:00
|
|
|
, ...
|
2019-09-05 22:43:33 -04:00
|
|
|
}@args:
|
|
|
|
|
|
|
|
(if buildType == "ament_python" then pythonPackages.buildPythonPackage
|
|
|
|
else stdenv.mkDerivation) (args // {
|
2022-09-20 17:42:34 -04:00
|
|
|
inherit doCheck dontWrapQtApps;
|
2019-09-28 15:46:34 -04:00
|
|
|
|
2020-04-23 13:48:03 -04:00
|
|
|
# Disable warnings that cause "Log limit exceeded" errors on Hydra in lots of
|
|
|
|
# packages that use Eigen
|
2020-08-24 18:28:26 -04:00
|
|
|
CXXFLAGS = CXXFLAGS + "-Wno-deprecated-declarations -Wno-deprecated-copy";
|
2020-04-23 13:48:03 -04:00
|
|
|
|
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") {
|
2019-09-28 15:46:34 -04:00
|
|
|
dontUseCmakeConfigure = true;
|
2020-03-04 17:18:10 -05:00
|
|
|
})
|