From 2753f7733004705d76b6ac5fb3f8ecf38c88e128 Mon Sep 17 00:00:00 2001 From: Ben Wolsieffer Date: Fri, 28 May 2021 19:23:44 -0400 Subject: [PATCH] gazebo_9: fix build Gazebo 9 assumes qwt headers are in a qwt/ subdirectory. This commit backports a patch from Gazebo 11 to fix this. --- pkgs/default.nix | 7 ------- pkgs/gazebo/default.nix | 7 +++++++ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pkgs/default.nix b/pkgs/default.nix index 5ca98f7346..93405fafd4 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -102,13 +102,6 @@ in { python37 = pythonOverridesFor super.python37; python38 = pythonOverridesFor super.python38; - qwt6 = super.qwt6.overrideAttrs ({ postInstall ? "", ... }: { - # Gazebo 9 expects headers to be in subdirectory - postInstall = postInstall + '' - ln -s "$out/include" "$out/include/qwt" - ''; - }); - sdformat_4 = self.callPackage ./sdformat/4.nix { }; sdformat_6 = self.callPackage ./sdformat/6.nix { }; sdformat_9 = self.callPackage ./sdformat { }; diff --git a/pkgs/gazebo/default.nix b/pkgs/gazebo/default.nix index 1c214fe334..f333e18f40 100644 --- a/pkgs/gazebo/default.nix +++ b/pkgs/gazebo/default.nix @@ -20,6 +20,13 @@ mkDerivation rec { sha256 = srcSha256; }; + # Fix compatibility with qwt headers not in subdirectory + # https://github.com/osrf/gazebo/pull/2887 + patches = lib.optional (lib.versionOlder version "11.3.0") (fetchpatch { + url = "https://github.com/osrf/gazebo/commit/25d3381c083a9eeafcee34ef648339a83e192676.patch"; + sha256 = "1qixrz2jiqdc37mgcsnv562m7mzr6w0rd67fmkr5710n6dnky4y7"; + }); + enableParallelBuilding = true; cmakeFlags = [ "-DUSE_HOST_CFLAGS=False" ];