Commit 90c70448 authored by Benjamin Sparks's avatar Benjamin Sparks
Browse files

gz-utils: enable tests

parent 7a99f210
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
@@ -10,6 +10,12 @@
  # buildInputs
  cli11,
  spdlog,

  # nativeCheckInputs
  python3,

  # checkInputs
  gtest,
}:
stdenv.mkDerivation (finalAttrs: {
  pname = "gz-utils";
@@ -22,6 +28,14 @@ stdenv.mkDerivation (finalAttrs: {
    hash = "sha256-fYzysdB608jfMb/EbqiGD4hXmPxcaVTUrt9Wx0dBlto=";
  };

  # Remove vendored gtest, use nixpkgs' version instead.
  postPatch = ''
    rm -r test/gtest_vendor

    substituteInPlace test/CMakeLists.txt --replace-fail \
      "add_subdirectory(gtest_vendor)" "# add_subdirectory(gtest_vendor)"
  '';

  nativeBuildInputs = [
    cmake
    gz-cmake
@@ -39,6 +53,12 @@ stdenv.mkDerivation (finalAttrs: {
    (lib.cmakeBool "GZ_UTILS_VENDOR_CLI11" false)
  ];

  nativeCheckInputs = [ python3 ];

  checkInputs = [ gtest ];

  doCheck = true;

  meta = {
    description = "General purpose utility classes and functions for the Gazebo libraries";
    homepage = "https://gazebosim.org/home";