gz-utils: correct dependencies, run tests, build docs (#401787)
This commit is contained in:
@@ -2,11 +2,23 @@
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
|
||||
# nativeBuildInputs
|
||||
cmake,
|
||||
gz-cmake,
|
||||
spdlog,
|
||||
}:
|
||||
doxygen,
|
||||
graphviz,
|
||||
|
||||
# buildInputs
|
||||
cli11,
|
||||
spdlog,
|
||||
|
||||
# nativeCheckInputs
|
||||
python3,
|
||||
|
||||
# checkInputs
|
||||
gtest,
|
||||
}:
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "gz-utils";
|
||||
version = "3.1.1";
|
||||
@@ -18,12 +30,49 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
hash = "sha256-fYzysdB608jfMb/EbqiGD4hXmPxcaVTUrt9Wx0dBlto=";
|
||||
};
|
||||
|
||||
outputs = [
|
||||
"doc"
|
||||
"out"
|
||||
];
|
||||
|
||||
# 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
|
||||
doxygen
|
||||
graphviz
|
||||
];
|
||||
|
||||
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)
|
||||
];
|
||||
|
||||
postBuild = ''
|
||||
make doc
|
||||
cp -r doxygen/html $doc
|
||||
'';
|
||||
|
||||
nativeCheckInputs = [ python3 ];
|
||||
|
||||
checkInputs = [ gtest ];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
meta = {
|
||||
description = "General purpose utility classes and functions for the Gazebo libraries";
|
||||
homepage = "https://gazebosim.org/home";
|
||||
|
||||
Reference in New Issue
Block a user