gz-utils: enable tests

This commit is contained in:
Benjamin Sparks
2025-04-25 16:52:23 +02:00
parent 7a99f21037
commit 90c70448cc
+20
View File
@@ -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";