2025-04-23 21:49:15 +02:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
fetchFromGitHub,
|
2025-04-25 15:02:07 +02:00
|
|
|
|
|
|
|
# nativeBuildInputs
|
2025-04-23 21:49:15 +02:00
|
|
|
cmake,
|
|
|
|
gz-cmake,
|
2025-04-25 17:25:33 +02:00
|
|
|
doxygen,
|
|
|
|
graphviz,
|
2025-04-25 15:02:07 +02:00
|
|
|
|
|
|
|
# buildInputs
|
2025-04-25 16:01:41 +02:00
|
|
|
cli11,
|
2025-04-23 21:49:15 +02:00
|
|
|
spdlog,
|
2025-04-25 16:52:23 +02:00
|
|
|
|
|
|
|
# nativeCheckInputs
|
|
|
|
python3,
|
|
|
|
|
|
|
|
# checkInputs
|
|
|
|
gtest,
|
2025-04-23 21:49:15 +02:00
|
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
|
|
pname = "gz-utils";
|
|
|
|
version = "3.1.1";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "gazebosim";
|
|
|
|
repo = "gz-utils";
|
|
|
|
tag = "gz-utils${lib.versions.major finalAttrs.version}_${finalAttrs.version}";
|
|
|
|
hash = "sha256-fYzysdB608jfMb/EbqiGD4hXmPxcaVTUrt9Wx0dBlto=";
|
|
|
|
};
|
|
|
|
|
2025-04-25 17:25:33 +02:00
|
|
|
outputs = [
|
|
|
|
"doc"
|
|
|
|
"out"
|
|
|
|
];
|
|
|
|
|
2025-04-25 16:52:23 +02:00
|
|
|
# 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)"
|
|
|
|
'';
|
|
|
|
|
2025-04-23 21:49:15 +02:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
gz-cmake
|
2025-04-25 17:25:33 +02:00
|
|
|
doxygen
|
|
|
|
graphviz
|
2025-04-23 21:49:15 +02:00
|
|
|
];
|
|
|
|
|
2025-04-25 16:01:41 +02:00
|
|
|
buildInputs = [
|
|
|
|
cli11
|
|
|
|
spdlog
|
|
|
|
];
|
|
|
|
|
|
|
|
# Indicate to CMake that we are not using the vendored CLI11 library.
|
|
|
|
# The integration tests make (unintentional?) unconditional usage of the vendored
|
|
|
|
# CLI11 library, so we can't remove that.
|
|
|
|
cmakeFlags = [
|
|
|
|
(lib.cmakeBool "GZ_UTILS_VENDOR_CLI11" false)
|
|
|
|
];
|
2025-04-25 15:02:07 +02:00
|
|
|
|
2025-04-25 17:25:33 +02:00
|
|
|
postBuild = ''
|
|
|
|
make doc
|
|
|
|
cp -r doxygen/html $doc
|
|
|
|
'';
|
|
|
|
|
2025-04-25 16:52:23 +02:00
|
|
|
nativeCheckInputs = [ python3 ];
|
|
|
|
|
|
|
|
checkInputs = [ gtest ];
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
2025-04-23 21:49:15 +02:00
|
|
|
meta = {
|
|
|
|
description = "General purpose utility classes and functions for the Gazebo libraries";
|
|
|
|
homepage = "https://gazebosim.org/home";
|
|
|
|
changelog = "https://github.com/gazebosim/gz-utils/blob/${finalAttrs.src.tag}/Changelog.md";
|
|
|
|
license = lib.licenses.asl20;
|
|
|
|
platforms = lib.platforms.unix ++ lib.platforms.windows;
|
|
|
|
maintainers = with lib.maintainers; [ guelakais ];
|
|
|
|
};
|
|
|
|
})
|