mirror of
https://github.com/lopsided98/nix-ros-overlay.git
synced 2025-07-14 06:00:38 +03:00

nixpkgs now requires explicitly enabling or disabling Qt5 wrapping. This commit disables wrapping by default, which breaks Qt apps that aren't overridden manually in distro-overlay.nix, but fixes all the Qt libraries that don't need wrapping. This is a sub-optimal solution, but matches the behavior that was there before wrapping was made mandatory.
34 lines
1.3 KiB
Nix
34 lines
1.3 KiB
Nix
{ 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
|
|
# 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
|
|
, CXXFLAGS ? ""
|
|
, passthru ? {}
|
|
, ...
|
|
}@args:
|
|
|
|
(if buildType == "ament_python" then pythonPackages.buildPythonPackage
|
|
else stdenv.mkDerivation) (args // {
|
|
inherit doCheck strictDeps dontWrapQtApps;
|
|
|
|
# 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";
|
|
|
|
passthru = passthru // {
|
|
rosPackage = true;
|
|
};
|
|
} // lib.optionalAttrs (buildType == "ament_python") {
|
|
dontUseCmakeConfigure = true;
|
|
})
|