diff --git a/.github/workflows/update.yaml b/.github/workflows/update.yaml index 93629d992a..6405344a5f 100644 --- a/.github/workflows/update.yaml +++ b/.github/workflows/update.yaml @@ -44,7 +44,7 @@ jobs: # permittedInsecurePackages is needed for updating some gz-*-vendor packages. # Note that this runs without access to SUPERFLORE_GITHUB_TOKEN. mkdir -p ~/.config/nixpkgs - echo '{ permittedInsecurePackages = [ "freeimage-unstable-2021-11-01" ]; }' > ~/.config/nixpkgs/config.nix + echo '{ permittedInsecurePackages = [ "freeimage-3.18.0-unstable-2024-04-18" ]; }' > ~/.config/nixpkgs/config.nix NIX_PATH=nixpkgs=$PWD ./maintainers/scripts/update-ament-vendor.sh || ret=$? git commit -m 'Update vendored-source.json files' $(find -name vendored-source.json) || : exit $ret diff --git a/distros/ament_vendor_wrapper.cmake b/distros/ament_vendor_wrapper.cmake new file mode 100644 index 0000000000..29d2b6ad38 --- /dev/null +++ b/distros/ament_vendor_wrapper.cmake @@ -0,0 +1,86 @@ +# CMake code that wraps ament_vendor macro for use with Nix. The +# wrapped version of ament_vendor serves two purposes: +# +# 1) Capturing information about what needs to be prefetched from from +# the Internet and stores it into vendored-source.json. +# +# 2) Modifying ament_vendor behavior to use the prefetched data +# instead of downloading them (downloading is not possible in Nix +# build sandbox). +# +# The functionality of the wrapper is controlled with the following +# CMake variables: +# +# AMENT_VENDOR_NIX_PREFETCH: If true, ament_vendor captures the +# information needed for prefetching the data. If false or undefined, +# ament_vendor obtains the data from the Nix store. +# +# AMENT_VENDOR_NIX_TAR_${TARGET_NAME}: Nix store path of the vendored +# source. +# +# The above variables are set in Nix function patchAmentVendorGit. + +if(NOT ament_cmake_vendor_package_FIND_QUIETLY) + message(STATUS "Using ament_vendor wrapped for Nix patching (${ament_cmake_vendor_package_DIR})") +endif() + +if(AMENT_VENDOR_NIX_PREFETCH) + # Write empty JSON object to vendored-source.json. Subsequent calls to + # ament_vendor() will add entries to it. + file(WRITE ${CMAKE_BINARY_DIR}/vendored-source.json "{}") + find_program(JQ jq) + find_program(NIX_PREFETCH_GIT nix-prefetch-git) +endif() + +macro(ament_vendor TARGET_NAME) + cmake_parse_arguments(_ARG "GLOBAL_HOOK;SKIP_INSTALL" "SOURCE_SUBDIR;VCS_TYPE;VCS_URL;VCS_VERSION;SATISFIED" "CMAKE_ARGS;PATCHES" ${ARGN}) + if(_ARG_UNPARSED_ARGUMENTS) + message(FATAL_ERROR "ament_vendor() called with unused arguments: " + "${_ARG_UNPARSED_ARGUMENTS}") + endif() + if(AMENT_VENDOR_NIX_PREFETCH) + # Read previous version of vendored-source.json + file(READ ${CMAKE_BINARY_DIR}/vendored-source.json VENDORED_SOURCE_JSON) + + # Add new entry to vendored-source.json + execute_process( + COMMAND ${NIX_PREFETCH_GIT} --url ${_ARG_VCS_URL} --rev ${_ARG_VCS_VERSION} --fetch-submodules + COMMAND ${JQ} "${VENDORED_SOURCE_JSON} + {${TARGET_NAME}: {url: \"${_ARG_VCS_URL}\", rev: \"${_ARG_VCS_VERSION}\", hash: .hash}}" + OUTPUT_FILE ${CMAKE_BINARY_DIR}/vendored-source.json + COMMAND_ECHO STDOUT + COMMAND_ERROR_IS_FATAL ANY) + + # Minimal implementation of the original ament_vendor macro that + # makes zenoh_cpp_vendor happy. Without this, generation of + # zenoh-cpp-vendor/vendored-source.json fails. If needed, we could + # also use ament_vendor_orig as below, but this is faster, because + # is doesn't download anything. + include(ExternalProject) + externalproject_add( + ${TARGET_NAME} + DOWNLOAD_COMMAND "" + ) + else() + if(_ARG_GLOBAL_HOOK) + set(_ARG_GLOBAL_HOOK "GLOBAL_HOOK") + else() + unset(_ARG_GLOBAL_HOOK) + endif() + if(_ARG_SKIP_INSTALL) + set(_ARG_SKIP_INSTALL "SKIP_INSTALL") + else() + unset(_ARG_SKIP_INSTALL) + endif() + cmake_language(CALL ament_vendor_orig ${TARGET_NAME} + VCS_TYPE tar + VCS_URL file://${AMENT_VENDOR_NIX_TAR_${TARGET_NAME}} + VCS_VERSION ${_ARG_VCS_VERSION} + ${_ARG_GLOBAL_HOOK} + SATISFIED ${_ARG_SATISFIED} + ${_ARG_SKIP_INSTALL} + SOURCE_SUBDIR ${_ARG_SOURCE_SUBDIR} + PATCHES ${_ARG_PATCHES} + CMAKE_ARGS ${_ARG_CMAKE_ARGS} + ) + endif() +endmacro() diff --git a/distros/jazzy/gz-cmake-vendor/vendored-source.json b/distros/jazzy/gz-cmake-vendor/vendored-source.json index 7d14d4b27c..2c4b9dda97 100644 --- a/distros/jazzy/gz-cmake-vendor/vendored-source.json +++ b/distros/jazzy/gz-cmake-vendor/vendored-source.json @@ -1,5 +1,7 @@ { - "url": "https://github.com/gazebosim/gz-cmake.git", - "rev": "gz-cmake3_3.5.4", - "hash": "sha256-mP0bBPWWAoUFsUwKn95Eqv1lW3lJdPEu3hhfmiK3mNQ=" + "gz_cmake_vendor": { + "url": "https://github.com/gazebosim/gz-cmake.git", + "rev": "gz-cmake3_3.5.4", + "hash": "sha256-mP0bBPWWAoUFsUwKn95Eqv1lW3lJdPEu3hhfmiK3mNQ=" + } } diff --git a/distros/jazzy/gz-common-vendor/vendored-source.json b/distros/jazzy/gz-common-vendor/vendored-source.json index 8282d1b094..c16c8d5da1 100644 --- a/distros/jazzy/gz-common-vendor/vendored-source.json +++ b/distros/jazzy/gz-common-vendor/vendored-source.json @@ -1,5 +1,7 @@ { - "url": "https://github.com/gazebosim/gz-common.git", - "rev": "gz-common5_5.7.1", - "hash": "sha256-vNCjCSQYCSUHXKwXnq8vwWXiSK2+cD3yPSLT1FdAWrE=" + "gz_common_vendor": { + "url": "https://github.com/gazebosim/gz-common.git", + "rev": "gz-common5_5.7.1", + "hash": "sha256-vNCjCSQYCSUHXKwXnq8vwWXiSK2+cD3yPSLT1FdAWrE=" + } } diff --git a/distros/jazzy/gz-dartsim-vendor/vendored-source.json b/distros/jazzy/gz-dartsim-vendor/vendored-source.json index 12128df0ba..35ac79b901 100644 --- a/distros/jazzy/gz-dartsim-vendor/vendored-source.json +++ b/distros/jazzy/gz-dartsim-vendor/vendored-source.json @@ -1,5 +1,7 @@ { - "url": "https://github.com/dartsim/dart.git", - "rev": "v6.13.2", - "hash": "sha256-AfKPqUiW6BsM98TIzTY2ZcFP1WvURs8/dGOzanIiB9g=" + "gz_dartsim_vendor": { + "url": "https://github.com/dartsim/dart.git", + "rev": "v6.13.2", + "hash": "sha256-AfKPqUiW6BsM98TIzTY2ZcFP1WvURs8/dGOzanIiB9g=" + } } diff --git a/distros/jazzy/gz-fuel-tools-vendor/vendored-source.json b/distros/jazzy/gz-fuel-tools-vendor/vendored-source.json index 62124f75ef..a2454b6e7e 100644 --- a/distros/jazzy/gz-fuel-tools-vendor/vendored-source.json +++ b/distros/jazzy/gz-fuel-tools-vendor/vendored-source.json @@ -1,5 +1,7 @@ { - "url": "https://github.com/gazebosim/gz-fuel-tools.git", - "rev": "gz-fuel-tools9_9.1.1", - "hash": "sha256-XQoBcCtzwzzPypS1kIeTCIbjtxrzaW3JvZLCYbwXAOk=" + "gz_fuel_tools_vendor": { + "url": "https://github.com/gazebosim/gz-fuel-tools.git", + "rev": "gz-fuel-tools9_9.1.1", + "hash": "sha256-XQoBcCtzwzzPypS1kIeTCIbjtxrzaW3JvZLCYbwXAOk=" + } } diff --git a/distros/jazzy/gz-gui-vendor/vendored-source.json b/distros/jazzy/gz-gui-vendor/vendored-source.json index 7a2c25c045..7204f09a30 100644 --- a/distros/jazzy/gz-gui-vendor/vendored-source.json +++ b/distros/jazzy/gz-gui-vendor/vendored-source.json @@ -1,5 +1,7 @@ { - "url": "https://github.com/gazebosim/gz-gui.git", - "rev": "gz-gui8_8.4.0", - "hash": "sha256-gf9XZzAX2g6r9ThIA0v2H2X/+uu9VnwvyvrdL5ZazM0=" + "gz_gui_vendor": { + "url": "https://github.com/gazebosim/gz-gui.git", + "rev": "gz-gui8_8.4.0", + "hash": "sha256-gf9XZzAX2g6r9ThIA0v2H2X/+uu9VnwvyvrdL5ZazM0=" + } } diff --git a/distros/jazzy/gz-launch-vendor/vendored-source.json b/distros/jazzy/gz-launch-vendor/vendored-source.json index b94f55d2a4..dab463c146 100644 --- a/distros/jazzy/gz-launch-vendor/vendored-source.json +++ b/distros/jazzy/gz-launch-vendor/vendored-source.json @@ -1,5 +1,7 @@ { - "url": "https://github.com/gazebosim/gz-launch.git", - "rev": "gz-launch7_7.1.1", - "hash": "sha256-S63DWe/c3cnEztxr3uJc0A4AmuiQk4o6m9yXj0X97Yk=" + "gz_launch_vendor": { + "url": "https://github.com/gazebosim/gz-launch.git", + "rev": "gz-launch7_7.1.1", + "hash": "sha256-S63DWe/c3cnEztxr3uJc0A4AmuiQk4o6m9yXj0X97Yk=" + } } diff --git a/distros/jazzy/gz-math-vendor/vendored-source.json b/distros/jazzy/gz-math-vendor/vendored-source.json index 8983af40ae..e5643412b4 100644 --- a/distros/jazzy/gz-math-vendor/vendored-source.json +++ b/distros/jazzy/gz-math-vendor/vendored-source.json @@ -1,5 +1,7 @@ { - "url": "https://github.com/gazebosim/gz-math.git", - "rev": "gz-math7_7.5.2", - "hash": "sha256-LwYeyv8nwX06n5ju+ra2uqNMedMSLRumem8qDHXtNns=" + "gz_math_vendor": { + "url": "https://github.com/gazebosim/gz-math.git", + "rev": "gz-math7_7.5.2", + "hash": "sha256-LwYeyv8nwX06n5ju+ra2uqNMedMSLRumem8qDHXtNns=" + } } diff --git a/distros/jazzy/gz-msgs-vendor/vendored-source.json b/distros/jazzy/gz-msgs-vendor/vendored-source.json index 403d6c01cb..735de924f1 100644 --- a/distros/jazzy/gz-msgs-vendor/vendored-source.json +++ b/distros/jazzy/gz-msgs-vendor/vendored-source.json @@ -1,5 +1,7 @@ { - "url": "https://github.com/gazebosim/gz-msgs.git", - "rev": "gz-msgs10_10.3.2", - "hash": "sha256-gxhRqLzBCaDmK67T5RryDpxbDR3WLgV9DFs7w6ieMxQ=" + "gz_msgs_vendor": { + "url": "https://github.com/gazebosim/gz-msgs.git", + "rev": "gz-msgs10_10.3.2", + "hash": "sha256-gxhRqLzBCaDmK67T5RryDpxbDR3WLgV9DFs7w6ieMxQ=" + } } diff --git a/distros/jazzy/gz-ogre-next-vendor/vendored-source.json b/distros/jazzy/gz-ogre-next-vendor/vendored-source.json index 9376049506..99396c9642 100644 --- a/distros/jazzy/gz-ogre-next-vendor/vendored-source.json +++ b/distros/jazzy/gz-ogre-next-vendor/vendored-source.json @@ -1,5 +1,7 @@ { - "url": "https://github.com/OGRECave/ogre-next.git", - "rev": "v2.3.3", - "hash": "sha256-elSj35LwsLzj1ssDPsk9NW/KSXfiOGYmw9hQSAWdpFM=" + "gz_ogre_next_vendor": { + "url": "https://github.com/OGRECave/ogre-next.git", + "rev": "v2.3.3", + "hash": "sha256-elSj35LwsLzj1ssDPsk9NW/KSXfiOGYmw9hQSAWdpFM=" + } } diff --git a/distros/jazzy/gz-physics-vendor/vendored-source.json b/distros/jazzy/gz-physics-vendor/vendored-source.json index b0a1c24be5..73572a873c 100644 --- a/distros/jazzy/gz-physics-vendor/vendored-source.json +++ b/distros/jazzy/gz-physics-vendor/vendored-source.json @@ -1,5 +1,7 @@ { - "url": "https://github.com/gazebosim/gz-physics.git", - "rev": "gz-physics7_7.5.0", - "hash": "sha256-75myTqDeEybvj5rsJxRambLPle1cen6HIatZGbVoXro=" + "gz_physics_vendor": { + "url": "https://github.com/gazebosim/gz-physics.git", + "rev": "gz-physics7_7.5.0", + "hash": "sha256-75myTqDeEybvj5rsJxRambLPle1cen6HIatZGbVoXro=" + } } diff --git a/distros/jazzy/gz-plugin-vendor/vendored-source.json b/distros/jazzy/gz-plugin-vendor/vendored-source.json index 7c674db1b3..4b0c35500e 100644 --- a/distros/jazzy/gz-plugin-vendor/vendored-source.json +++ b/distros/jazzy/gz-plugin-vendor/vendored-source.json @@ -1,5 +1,7 @@ { - "url": "https://github.com/gazebosim/gz-plugin.git", - "rev": "gz-plugin2_2.0.4", - "hash": "sha256-iL4+EdFFAU55FVqE/CvyTv1zNaXxBWqWx44L0BeG2MU=" + "gz_plugin_vendor": { + "url": "https://github.com/gazebosim/gz-plugin.git", + "rev": "gz-plugin2_2.0.4", + "hash": "sha256-iL4+EdFFAU55FVqE/CvyTv1zNaXxBWqWx44L0BeG2MU=" + } } diff --git a/distros/jazzy/gz-rendering-vendor/vendored-source.json b/distros/jazzy/gz-rendering-vendor/vendored-source.json index ebffd6d2a8..afb17accec 100644 --- a/distros/jazzy/gz-rendering-vendor/vendored-source.json +++ b/distros/jazzy/gz-rendering-vendor/vendored-source.json @@ -1,5 +1,7 @@ { - "url": "https://github.com/gazebosim/gz-rendering.git", - "rev": "gz-rendering8_8.2.2", - "hash": "sha256-x+QHn8d+19U12CG1+HEmP0KcM3beY00Vvrc8mrxvAs0=" + "gz_rendering_vendor": { + "url": "https://github.com/gazebosim/gz-rendering.git", + "rev": "gz-rendering8_8.2.2", + "hash": "sha256-x+QHn8d+19U12CG1+HEmP0KcM3beY00Vvrc8mrxvAs0=" + } } diff --git a/distros/jazzy/gz-sensors-vendor/vendored-source.json b/distros/jazzy/gz-sensors-vendor/vendored-source.json index 652a127c46..979c42f62b 100644 --- a/distros/jazzy/gz-sensors-vendor/vendored-source.json +++ b/distros/jazzy/gz-sensors-vendor/vendored-source.json @@ -1,5 +1,7 @@ { - "url": "https://github.com/gazebosim/gz-sensors.git", - "rev": "gz-sensors8_8.2.2", - "hash": "sha256-TRDMCMesJXVSVGA3bnRngtXTi4VVf0y12AJQ79EEMiI=" + "gz_sensors_vendor": { + "url": "https://github.com/gazebosim/gz-sensors.git", + "rev": "gz-sensors8_8.2.2", + "hash": "sha256-TRDMCMesJXVSVGA3bnRngtXTi4VVf0y12AJQ79EEMiI=" + } } diff --git a/distros/jazzy/gz-sim-vendor/vendored-source.json b/distros/jazzy/gz-sim-vendor/vendored-source.json index 2c62e09de7..7f5ad28356 100644 --- a/distros/jazzy/gz-sim-vendor/vendored-source.json +++ b/distros/jazzy/gz-sim-vendor/vendored-source.json @@ -1,5 +1,7 @@ { - "url": "https://github.com/gazebosim/gz-sim.git", - "rev": "gz-sim8_8.9.0", - "hash": "sha256-hvhq2XBzcIoupJdJyJzk38LDXoEnd9iBCCiXvPZsPqY=" + "gz_sim_vendor": { + "url": "https://github.com/gazebosim/gz-sim.git", + "rev": "gz-sim8_8.9.0", + "hash": "sha256-hvhq2XBzcIoupJdJyJzk38LDXoEnd9iBCCiXvPZsPqY=" + } } diff --git a/distros/jazzy/gz-tools-vendor/vendored-source.json b/distros/jazzy/gz-tools-vendor/vendored-source.json index 29c4573cf1..9a2455dca1 100644 --- a/distros/jazzy/gz-tools-vendor/vendored-source.json +++ b/distros/jazzy/gz-tools-vendor/vendored-source.json @@ -1,5 +1,7 @@ { - "url": "https://github.com/gazebosim/gz-tools.git", - "rev": "gz-tools2_2.0.2", - "hash": "sha256-CY+W1jWIkszKwKuLgKmJpZMXHn0RnueMHFSDhOXIzLg=" + "gz_tools_vendor": { + "url": "https://github.com/gazebosim/gz-tools.git", + "rev": "gz-tools2_2.0.2", + "hash": "sha256-CY+W1jWIkszKwKuLgKmJpZMXHn0RnueMHFSDhOXIzLg=" + } } diff --git a/distros/jazzy/gz-transport-vendor/vendored-source.json b/distros/jazzy/gz-transport-vendor/vendored-source.json index 19a4897198..d9b70e36d2 100644 --- a/distros/jazzy/gz-transport-vendor/vendored-source.json +++ b/distros/jazzy/gz-transport-vendor/vendored-source.json @@ -1,5 +1,7 @@ { - "url": "https://github.com/gazebosim/gz-transport.git", - "rev": "gz-transport13_13.4.1", - "hash": "sha256-hCP+yVoyl1c3KNmQ5jKrYvPT1IlAy9JkCh0c0mOF+KM=" + "gz_transport_vendor": { + "url": "https://github.com/gazebosim/gz-transport.git", + "rev": "gz-transport13_13.4.1", + "hash": "sha256-hCP+yVoyl1c3KNmQ5jKrYvPT1IlAy9JkCh0c0mOF+KM=" + } } diff --git a/distros/jazzy/gz-utils-vendor/vendored-source.json b/distros/jazzy/gz-utils-vendor/vendored-source.json index f491ee549f..c77f03ec18 100644 --- a/distros/jazzy/gz-utils-vendor/vendored-source.json +++ b/distros/jazzy/gz-utils-vendor/vendored-source.json @@ -1,5 +1,7 @@ { - "url": "https://github.com/gazebosim/gz-utils.git", - "rev": "gz-utils2_2.2.1", - "hash": "sha256-utVW8pTP/emEWblTxVb6jzulKdxss+2VfS552MWMqm4=" + "gz_utils_vendor": { + "url": "https://github.com/gazebosim/gz-utils.git", + "rev": "gz-utils2_2.2.1", + "hash": "sha256-utVW8pTP/emEWblTxVb6jzulKdxss+2VfS552MWMqm4=" + } } diff --git a/distros/jazzy/overrides.nix b/distros/jazzy/overrides.nix index 110c473c1e..4e90204379 100644 --- a/distros/jazzy/overrides.nix +++ b/distros/jazzy/overrides.nix @@ -250,4 +250,6 @@ in { }) ]; }); + + zenoh-cpp-vendor = lib.patchAmentVendorGit rosSuper.zenoh-cpp-vendor { }; } diff --git a/distros/jazzy/rviz-ogre-vendor/vendored-source.json b/distros/jazzy/rviz-ogre-vendor/vendored-source.json index c2f5ddfbc8..3c9bd2cfa9 100644 --- a/distros/jazzy/rviz-ogre-vendor/vendored-source.json +++ b/distros/jazzy/rviz-ogre-vendor/vendored-source.json @@ -1,5 +1,7 @@ { - "url": "https://github.com/OGRECave/ogre.git", - "rev": "v1.12.10", - "hash": "sha256-Z0ixdSmkV93coBBVZ5R3lPLfVMXRfWsFz/RsSyqPWFY=" + "ogre_vendor": { + "url": "https://github.com/OGRECave/ogre.git", + "rev": "v1.12.10", + "hash": "sha256-Z0ixdSmkV93coBBVZ5R3lPLfVMXRfWsFz/RsSyqPWFY=" + } } diff --git a/distros/jazzy/sdformat-vendor/vendored-source.json b/distros/jazzy/sdformat-vendor/vendored-source.json index de840c1b91..7f191167c7 100644 --- a/distros/jazzy/sdformat-vendor/vendored-source.json +++ b/distros/jazzy/sdformat-vendor/vendored-source.json @@ -1,5 +1,7 @@ { - "url": "https://github.com/gazebosim/sdformat.git", - "rev": "sdformat14_14.7.0", - "hash": "sha256-p2e01bCoMpDhia1yOFa5wIP2ritBiWNT5jYbp/bg1+g=" + "sdformat_vendor": { + "url": "https://github.com/gazebosim/sdformat.git", + "rev": "sdformat14_14.7.0", + "hash": "sha256-p2e01bCoMpDhia1yOFa5wIP2ritBiWNT5jYbp/bg1+g=" + } } diff --git a/distros/jazzy/zenoh-cpp-vendor/vendored-source.json b/distros/jazzy/zenoh-cpp-vendor/vendored-source.json new file mode 100644 index 0000000000..821b6117b8 --- /dev/null +++ b/distros/jazzy/zenoh-cpp-vendor/vendored-source.json @@ -0,0 +1,12 @@ +{ + "zenoh_c_vendor": { + "url": "https://github.com/eclipse-zenoh/zenoh-c.git", + "rev": "e6a1971139f405f7887bf5bb54f0efe402123032", + "hash": "sha256-eJbnb1UJbtuYb+dSpKqVgI1p/97bSc+KTcbO1GNg9jU=" + }, + "zenoh_cpp_vendor": { + "url": "https://github.com/eclipse-zenoh/zenoh-cpp", + "rev": "8ad67f6c7a9031acd437c8739bbc8ddab0ca8173", + "hash": "sha256-0iRhmMtrhDdM7X0ByiICT4s7lDFcGLSR1dEImzT1mWs=" + } +} diff --git a/distros/rolling/gz-cmake-vendor/vendored-source.json b/distros/rolling/gz-cmake-vendor/vendored-source.json index c705713629..7d302cd86f 100644 --- a/distros/rolling/gz-cmake-vendor/vendored-source.json +++ b/distros/rolling/gz-cmake-vendor/vendored-source.json @@ -1,5 +1,7 @@ { - "url": "https://github.com/gazebosim/gz-cmake.git", - "rev": "gz-cmake4_4.1.1", - "hash": "sha256-BWgRm+3UW65Cu7TqXtFFG05JlYF52dbpAsIE8aDnJM0=" + "gz_cmake_vendor": { + "url": "https://github.com/gazebosim/gz-cmake.git", + "rev": "gz-cmake4_4.1.1", + "hash": "sha256-BWgRm+3UW65Cu7TqXtFFG05JlYF52dbpAsIE8aDnJM0=" + } } diff --git a/distros/rolling/gz-common-vendor/vendored-source.json b/distros/rolling/gz-common-vendor/vendored-source.json index 9c46bb52c2..f0b88901c1 100644 --- a/distros/rolling/gz-common-vendor/vendored-source.json +++ b/distros/rolling/gz-common-vendor/vendored-source.json @@ -1,5 +1,7 @@ { - "url": "https://github.com/gazebosim/gz-common.git", - "rev": "gz-common6_6.0.2", - "hash": "sha256-sY9g+AatS+ddYSUAjqumfZNi2JIc+DFbiVYMaWKMC78=" + "gz_common_vendor": { + "url": "https://github.com/gazebosim/gz-common.git", + "rev": "gz-common6_6.0.2", + "hash": "sha256-sY9g+AatS+ddYSUAjqumfZNi2JIc+DFbiVYMaWKMC78=" + } } diff --git a/distros/rolling/gz-dartsim-vendor/vendored-source.json b/distros/rolling/gz-dartsim-vendor/vendored-source.json index 12128df0ba..35ac79b901 100644 --- a/distros/rolling/gz-dartsim-vendor/vendored-source.json +++ b/distros/rolling/gz-dartsim-vendor/vendored-source.json @@ -1,5 +1,7 @@ { - "url": "https://github.com/dartsim/dart.git", - "rev": "v6.13.2", - "hash": "sha256-AfKPqUiW6BsM98TIzTY2ZcFP1WvURs8/dGOzanIiB9g=" + "gz_dartsim_vendor": { + "url": "https://github.com/dartsim/dart.git", + "rev": "v6.13.2", + "hash": "sha256-AfKPqUiW6BsM98TIzTY2ZcFP1WvURs8/dGOzanIiB9g=" + } } diff --git a/distros/rolling/gz-fuel-tools-vendor/vendored-source.json b/distros/rolling/gz-fuel-tools-vendor/vendored-source.json index 9d7f0ba5a7..a0dc797a0a 100644 --- a/distros/rolling/gz-fuel-tools-vendor/vendored-source.json +++ b/distros/rolling/gz-fuel-tools-vendor/vendored-source.json @@ -1,5 +1,7 @@ { - "url": "https://github.com/gazebosim/gz-fuel-tools.git", - "rev": "gz-fuel-tools10_10.0.1", - "hash": "sha256-/Xfhec6kpv6srSp+hudqBaK4dKFn0QK45aGqxzNyytw=" + "gz_fuel_tools_vendor": { + "url": "https://github.com/gazebosim/gz-fuel-tools.git", + "rev": "gz-fuel-tools10_10.0.1", + "hash": "sha256-/Xfhec6kpv6srSp+hudqBaK4dKFn0QK45aGqxzNyytw=" + } } diff --git a/distros/rolling/gz-gui-vendor/vendored-source.json b/distros/rolling/gz-gui-vendor/vendored-source.json index 4e683ec85f..753d09cd89 100644 --- a/distros/rolling/gz-gui-vendor/vendored-source.json +++ b/distros/rolling/gz-gui-vendor/vendored-source.json @@ -1,5 +1,7 @@ { - "url": "https://github.com/gazebosim/gz-gui.git", - "rev": "gz-gui9_9.0.1", - "hash": "sha256-ZBDgd37TPBOldorGZimsCk57fVa7tTc8wRwUGFBZnDk=" + "gz_gui_vendor": { + "url": "https://github.com/gazebosim/gz-gui.git", + "rev": "gz-gui9_9.0.1", + "hash": "sha256-ZBDgd37TPBOldorGZimsCk57fVa7tTc8wRwUGFBZnDk=" + } } diff --git a/distros/rolling/gz-launch-vendor/vendored-source.json b/distros/rolling/gz-launch-vendor/vendored-source.json index 5b170f37d6..c1e3727277 100644 --- a/distros/rolling/gz-launch-vendor/vendored-source.json +++ b/distros/rolling/gz-launch-vendor/vendored-source.json @@ -1,5 +1,7 @@ { - "url": "https://github.com/gazebosim/gz-launch.git", - "rev": "gz-launch8_8.0.1", - "hash": "sha256-el+4sVBOmeBj8VJqKut8pIhVJeyEyodrt6titunbBF0=" + "gz_launch_vendor": { + "url": "https://github.com/gazebosim/gz-launch.git", + "rev": "gz-launch8_8.0.1", + "hash": "sha256-el+4sVBOmeBj8VJqKut8pIhVJeyEyodrt6titunbBF0=" + } } diff --git a/distros/rolling/gz-math-vendor/vendored-source.json b/distros/rolling/gz-math-vendor/vendored-source.json index 4f6787dd5a..fe87cf8fb1 100644 --- a/distros/rolling/gz-math-vendor/vendored-source.json +++ b/distros/rolling/gz-math-vendor/vendored-source.json @@ -1,5 +1,7 @@ { - "url": "https://github.com/gazebosim/gz-math.git", - "rev": "gz-math8_8.1.1", - "hash": "sha256-E7u3EtpqNLvcqI5ycezwwAlbVHM3JdqeyLFWYlEaOYo=" + "gz_math_vendor": { + "url": "https://github.com/gazebosim/gz-math.git", + "rev": "gz-math8_8.1.1", + "hash": "sha256-E7u3EtpqNLvcqI5ycezwwAlbVHM3JdqeyLFWYlEaOYo=" + } } diff --git a/distros/rolling/gz-msgs-vendor/vendored-source.json b/distros/rolling/gz-msgs-vendor/vendored-source.json index 24c5946435..a130ab4478 100644 --- a/distros/rolling/gz-msgs-vendor/vendored-source.json +++ b/distros/rolling/gz-msgs-vendor/vendored-source.json @@ -1,5 +1,7 @@ { - "url": "https://github.com/gazebosim/gz-msgs.git", - "rev": "gz-msgs11_11.0.2", - "hash": "sha256-PUhFOmVPRiOVWfOjAU8z8dcxKPdcoTrgRwDGXP/vsUs=" + "gz_msgs_vendor": { + "url": "https://github.com/gazebosim/gz-msgs.git", + "rev": "gz-msgs11_11.0.2", + "hash": "sha256-PUhFOmVPRiOVWfOjAU8z8dcxKPdcoTrgRwDGXP/vsUs=" + } } diff --git a/distros/rolling/gz-ogre-next-vendor/vendored-source.json b/distros/rolling/gz-ogre-next-vendor/vendored-source.json index 9376049506..99396c9642 100644 --- a/distros/rolling/gz-ogre-next-vendor/vendored-source.json +++ b/distros/rolling/gz-ogre-next-vendor/vendored-source.json @@ -1,5 +1,7 @@ { - "url": "https://github.com/OGRECave/ogre-next.git", - "rev": "v2.3.3", - "hash": "sha256-elSj35LwsLzj1ssDPsk9NW/KSXfiOGYmw9hQSAWdpFM=" + "gz_ogre_next_vendor": { + "url": "https://github.com/OGRECave/ogre-next.git", + "rev": "v2.3.3", + "hash": "sha256-elSj35LwsLzj1ssDPsk9NW/KSXfiOGYmw9hQSAWdpFM=" + } } diff --git a/distros/rolling/gz-physics-vendor/vendored-source.json b/distros/rolling/gz-physics-vendor/vendored-source.json index eba3585135..1b061c684b 100644 --- a/distros/rolling/gz-physics-vendor/vendored-source.json +++ b/distros/rolling/gz-physics-vendor/vendored-source.json @@ -1,5 +1,7 @@ { - "url": "https://github.com/gazebosim/gz-physics.git", - "rev": "gz-physics8_8.1.0", - "hash": "sha256-FnVKVbPCn3B6/sZKiPJqUjUgVilwoeP/H97eg/dirz8=" + "gz_physics_vendor": { + "url": "https://github.com/gazebosim/gz-physics.git", + "rev": "gz-physics8_8.1.0", + "hash": "sha256-FnVKVbPCn3B6/sZKiPJqUjUgVilwoeP/H97eg/dirz8=" + } } diff --git a/distros/rolling/gz-plugin-vendor/vendored-source.json b/distros/rolling/gz-plugin-vendor/vendored-source.json index 391fc00186..4c77378f24 100644 --- a/distros/rolling/gz-plugin-vendor/vendored-source.json +++ b/distros/rolling/gz-plugin-vendor/vendored-source.json @@ -1,5 +1,7 @@ { - "url": "https://github.com/gazebosim/gz-plugin.git", - "rev": "gz-plugin3_3.0.1", - "hash": "sha256-7v6fzylJ4R1uoyQFM+eyl2/bXVy5MGC5dPjS7/taB8U=" + "gz_plugin_vendor": { + "url": "https://github.com/gazebosim/gz-plugin.git", + "rev": "gz-plugin3_3.0.1", + "hash": "sha256-7v6fzylJ4R1uoyQFM+eyl2/bXVy5MGC5dPjS7/taB8U=" + } } diff --git a/distros/rolling/gz-rendering-vendor/vendored-source.json b/distros/rolling/gz-rendering-vendor/vendored-source.json index feba315d53..c2bc7b7177 100644 --- a/distros/rolling/gz-rendering-vendor/vendored-source.json +++ b/distros/rolling/gz-rendering-vendor/vendored-source.json @@ -1,5 +1,7 @@ { - "url": "https://github.com/gazebosim/gz-rendering.git", - "rev": "gz-rendering9_9.1.0", - "hash": "sha256-L2xkd93zhXtvbbzRrdjsoxbDtopp/RpcWBh1tfGvLeM=" + "gz_rendering_vendor": { + "url": "https://github.com/gazebosim/gz-rendering.git", + "rev": "gz-rendering9_9.1.0", + "hash": "sha256-L2xkd93zhXtvbbzRrdjsoxbDtopp/RpcWBh1tfGvLeM=" + } } diff --git a/distros/rolling/gz-sensors-vendor/vendored-source.json b/distros/rolling/gz-sensors-vendor/vendored-source.json index 87c92481c0..d86ba39594 100644 --- a/distros/rolling/gz-sensors-vendor/vendored-source.json +++ b/distros/rolling/gz-sensors-vendor/vendored-source.json @@ -1,5 +1,7 @@ { - "url": "https://github.com/gazebosim/gz-sensors.git", - "rev": "gz-sensors9_9.1.0", - "hash": "sha256-dMqJqp5229r/mKjBzUJD/tEbsYZANAFNycHYc7CIkz8=" + "gz_sensors_vendor": { + "url": "https://github.com/gazebosim/gz-sensors.git", + "rev": "gz-sensors9_9.1.0", + "hash": "sha256-dMqJqp5229r/mKjBzUJD/tEbsYZANAFNycHYc7CIkz8=" + } } diff --git a/distros/rolling/gz-sim-vendor/vendored-source.json b/distros/rolling/gz-sim-vendor/vendored-source.json index 183696a8e7..2dc9729305 100644 --- a/distros/rolling/gz-sim-vendor/vendored-source.json +++ b/distros/rolling/gz-sim-vendor/vendored-source.json @@ -1,5 +1,7 @@ { - "url": "https://github.com/gazebosim/gz-sim.git", - "rev": "gz-sim9_9.1.0", - "hash": "sha256-niVXuqMvEhwCW2NcrEhIChh3DsD2M8ZTspDi+zF0kBc=" + "gz_sim_vendor": { + "url": "https://github.com/gazebosim/gz-sim.git", + "rev": "gz-sim9_9.1.0", + "hash": "sha256-niVXuqMvEhwCW2NcrEhIChh3DsD2M8ZTspDi+zF0kBc=" + } } diff --git a/distros/rolling/gz-tools-vendor/vendored-source.json b/distros/rolling/gz-tools-vendor/vendored-source.json index 29c4573cf1..9a2455dca1 100644 --- a/distros/rolling/gz-tools-vendor/vendored-source.json +++ b/distros/rolling/gz-tools-vendor/vendored-source.json @@ -1,5 +1,7 @@ { - "url": "https://github.com/gazebosim/gz-tools.git", - "rev": "gz-tools2_2.0.2", - "hash": "sha256-CY+W1jWIkszKwKuLgKmJpZMXHn0RnueMHFSDhOXIzLg=" + "gz_tools_vendor": { + "url": "https://github.com/gazebosim/gz-tools.git", + "rev": "gz-tools2_2.0.2", + "hash": "sha256-CY+W1jWIkszKwKuLgKmJpZMXHn0RnueMHFSDhOXIzLg=" + } } diff --git a/distros/rolling/gz-transport-vendor/vendored-source.json b/distros/rolling/gz-transport-vendor/vendored-source.json index 6f99300da0..4f5e3a3b94 100644 --- a/distros/rolling/gz-transport-vendor/vendored-source.json +++ b/distros/rolling/gz-transport-vendor/vendored-source.json @@ -1,5 +1,7 @@ { - "url": "https://github.com/gazebosim/gz-transport.git", - "rev": "gz-transport14_14.0.1", - "hash": "sha256-pSoadkpVaAEswmZuK13Y7PhxgvzTK1G2wI5+Fomlm/o=" + "gz_transport_vendor": { + "url": "https://github.com/gazebosim/gz-transport.git", + "rev": "gz-transport14_14.0.1", + "hash": "sha256-pSoadkpVaAEswmZuK13Y7PhxgvzTK1G2wI5+Fomlm/o=" + } } diff --git a/distros/rolling/gz-utils-vendor/vendored-source.json b/distros/rolling/gz-utils-vendor/vendored-source.json index 8b77c59989..e4ba2c9903 100644 --- a/distros/rolling/gz-utils-vendor/vendored-source.json +++ b/distros/rolling/gz-utils-vendor/vendored-source.json @@ -1,5 +1,7 @@ { - "url": "https://github.com/gazebosim/gz-utils.git", - "rev": "gz-utils3_3.1.1", - "hash": "sha256-fYzysdB608jfMb/EbqiGD4hXmPxcaVTUrt9Wx0dBlto=" + "gz_utils_vendor": { + "url": "https://github.com/gazebosim/gz-utils.git", + "rev": "gz-utils3_3.1.1", + "hash": "sha256-fYzysdB608jfMb/EbqiGD4hXmPxcaVTUrt9Wx0dBlto=" + } } diff --git a/distros/rolling/rviz-ogre-vendor/vendored-source.json b/distros/rolling/rviz-ogre-vendor/vendored-source.json index c2f5ddfbc8..3c9bd2cfa9 100644 --- a/distros/rolling/rviz-ogre-vendor/vendored-source.json +++ b/distros/rolling/rviz-ogre-vendor/vendored-source.json @@ -1,5 +1,7 @@ { - "url": "https://github.com/OGRECave/ogre.git", - "rev": "v1.12.10", - "hash": "sha256-Z0ixdSmkV93coBBVZ5R3lPLfVMXRfWsFz/RsSyqPWFY=" + "ogre_vendor": { + "url": "https://github.com/OGRECave/ogre.git", + "rev": "v1.12.10", + "hash": "sha256-Z0ixdSmkV93coBBVZ5R3lPLfVMXRfWsFz/RsSyqPWFY=" + } } diff --git a/distros/rolling/sdformat-vendor/vendored-source.json b/distros/rolling/sdformat-vendor/vendored-source.json index 77ecb0da24..2a91b6f511 100644 --- a/distros/rolling/sdformat-vendor/vendored-source.json +++ b/distros/rolling/sdformat-vendor/vendored-source.json @@ -1,5 +1,7 @@ { - "url": "https://github.com/gazebosim/sdformat.git", - "rev": "sdformat15_15.2.0", - "hash": "sha256-RarpOKoJ9w+yJw5HU5exZYjx1zVdtkE05+8PBADhOwY=" + "sdformat_vendor": { + "url": "https://github.com/gazebosim/sdformat.git", + "rev": "sdformat15_15.2.0", + "hash": "sha256-RarpOKoJ9w+yJw5HU5exZYjx1zVdtkE05+8PBADhOwY=" + } } diff --git a/distros/ros2-overlay.nix b/distros/ros2-overlay.nix index c585883dc3..c01a6b9676 100644 --- a/distros/ros2-overlay.nix +++ b/distros/ros2-overlay.nix @@ -23,7 +23,6 @@ rosSelf: rosSuper: with rosSelf.lib; { # to worry about collisions with system packages and Nix tooling generally # expects standard directories. postPatch = postPatch + '' - ls -l cmake/templates substituteInPlace cmake/ament_vendor.cmake \ --replace-fail 'opt/''${PROJECT_NAME}' . substituteInPlace cmake/templates/vendor_package.dsv.in \ @@ -35,6 +34,23 @@ rosSelf: rosSuper: with rosSelf.lib; { ''; }); + # Version of ament-cmake-vendor-package for use in Nix build sandbox + # without network access. The unwrapped version is still useful in + # e.g. nix-shell. + ament-cmake-vendor-package-wrapped = rosSelf.ament-cmake-vendor-package.overrideAttrs ({ + postPatch ? "", ... + }: { + postPatch = postPatch + '' + # Rename the macro so that we can wrap it with our wrapper + substituteInPlace cmake/ament_vendor.cmake \ + --replace-fail 'macro(ament_vendor TARGET_NAME)' 'macro(ament_vendor_orig TARGET_NAME)' + cp ${./ament_vendor_wrapper.cmake} ament_vendor_wrapper.cmake + # Add our wrapper to the list of cmake files + substituteInPlace CMakeLists.txt \ + --replace-fail 'CONFIG_EXTRAS' 'CONFIG_EXTRAS "ament_vendor_wrapper.cmake"' + ''; + }); + backward-ros = rosSuper.backward-ros.overrideAttrs ({ postPatch ? "", ... }: { # The `--as-needed` flag directs the linker to search all libraries specified diff --git a/lib/ament_cmake_vendor_packageConfig.cmake b/lib/ament_cmake_vendor_packageConfig.cmake deleted file mode 100644 index cb835d4e71..0000000000 --- a/lib/ament_cmake_vendor_packageConfig.cmake +++ /dev/null @@ -1,32 +0,0 @@ -# CMake package that defines alternative version of ament_vendor macro -# to extract information about vendored source to -# vendored-source.json. Normally, the ament_vendor macro is defined in -# the ament_cmake_vendor_package and it downloads the vendored source -# code at compile time. This is not possible with Nix, because Nix -# builds packages without network access. Therefore, we inject this -# alternative macro to cmake at update time and it extracts the -# information needed by Nix to download the source code. The main -# entry point to all this functionality is in the patchAmentVendorGit -# function. - -if(NOT ament_cmake_vendor_package_FIND_QUIETLY) - message(STATUS "Found ament_cmake_vendor_package: Dummy version for Nix patching (${ament_cmake_vendor_package_DIR})") -endif() - -find_program(JQ jq) -find_program(NIX_PREFETCH_GIT nix-prefetch-git) - -macro(ament_vendor TARGET_NAME) - cmake_parse_arguments(_ARG "GLOBAL_HOOK;SKIP_INSTALL" "SOURCE_SUBDIR;VCS_TYPE;VCS_URL;VCS_VERSION;SATISFIED" "CMAKE_ARGS;PATCHES" ${ARGN}) - if(_ARG_UNPARSED_ARGUMENTS) - message(FATAL_ERROR "ament_vendor() called with unused arguments: " - "${_ARG_UNPARSED_ARGUMENTS}") - endif() - - execute_process( - COMMAND ${NIX_PREFETCH_GIT} --url ${_ARG_VCS_URL} --rev ${_ARG_VCS_VERSION} - COMMAND ${JQ} "{url: \"${_ARG_VCS_URL}\", rev: \"${_ARG_VCS_VERSION}\", hash: .hash}" - OUTPUT_FILE ${CMAKE_BINARY_DIR}/vendored-source.json - COMMAND_ECHO STDOUT - COMMAND_ERROR_IS_FATAL ANY) -endmacro() diff --git a/lib/default.nix b/lib/default.nix index 66b1debd86..3b91a57d0c 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -85,56 +85,67 @@ fetchgitArgs ? {}, tarSourceArgs ? {} }: pkg.overrideAttrs ({ + cmakeFlags ? [], nativeBuildInputs ? [], passthru ? {}, postPatch ? "", ... }: let + # Make sure that non-existence of vendored-source.json file + # doesn't cause eval errors. This would break automatic updates. vendoredSourceJson = "${dirOf pkg.meta.position}/vendored-source.json"; - inherit (builtins) stringLength substring pathExists; + inherit (builtins) stringLength substring pathExists mapAttrs attrValues; nameStart = 5 + stringLength pkg.rosDistro; # e.g. ros-jazzy- => 10 attr = substring nameStart (-1) pkg.pname; errMsg = '' error: File ${vendoredSourceJson} missing. Run "$(nix-build -A rosPackages.${pkg.rosDistro}.${attr}.updateAmentVendor)" to create it. ''; - sourceInfo = builtins.fromJSON (builtins.readFile vendoredSourceJson); + sourceInfos = builtins.fromJSON (builtins.readFile vendoredSourceJson); # ament_vendor doesn't allow patches for path inputs, so we have to pack it # into a tar first. Additionally, vcstool only accepts tarballs with the # version number as the root directory name. - vendor = lib.tarSource tarSourceArgs ( + vendor = sourceInfo: lib.tarSource tarSourceArgs ( self.fetchgit (sourceInfo // fetchgitArgs // { name = sourceInfo.rev; })); in { - # CMake ExternalProject patches are applied with git apply - nativeBuildInputs = nativeBuildInputs ++ [ self.git ]; - postPatch = (if pathExists vendoredSourceJson then '' - sed -i '\|VCS_URL\s*|c\ - VCS_URL "file://${vendor}"\ - VCS_TYPE tar' \ - ${lib.escapeShellArg file} - '' else '' - echo >&2 ${lib.escapeShellArg errMsg} - exit 1 - '') + postPatch; + + nativeBuildInputs = [ + # Prepend wrapped ament_vendor to be found by CMake before the + # unwrapped one + rosSelf.ament-cmake-vendor-package-wrapped + ] ++ nativeBuildInputs ++ [ + # CMake ExternalProject patches are applied with git apply + self.git + ]; + cmakeFlags = cmakeFlags ++ lib.optionals (pathExists vendoredSourceJson) + ( + # Tell ament_vendor_wrapper.cmake where to find tarballs with vendored sources + attrValues (mapAttrs (n: v: "-DAMENT_VENDOR_NIX_TAR_${n}=${vendor v}") sourceInfos) + ); + postPatch = + if pathExists vendoredSourceJson then + postPatch + else '' + echo >&2 ${lib.escapeShellArg errMsg} + exit 1 + ''; passthru = passthru // { # Script to automatically update vendored-source.json by running # CMake with injected modified version of ament_cmake macro. updateAmentVendor = let source = self.srcOnly pkg; sourceDrvPath = builtins.unsafeDiscardOutputDependency source.drvPath; - amentVendorNix = self.runCommand "ament_cmake_vendor_package_nix" {} '' - install -D ${./ament_cmake_vendor_packageConfig.cmake} $out/ament_cmake_vendor_packageConfig.cmake - ''; updateScript = self.writeShellScript "ament-vendor-update.sh" '' set -eo pipefail cd "$(${self.coreutils}/bin/mktemp -d)" trap "${self.coreutils}/bin/rm -rf '$PWD'" SIGINT SIGTERM ERR EXIT source "$stdenv/setup" export NIX_SSL_CERT_FILE="${self.cacert}/etc/ssl/certs/ca-bundle.crt" - # Inject our version of ament_cmake_vendor_package - export PATH="${lib.makeBinPath (with self; [ nix-prefetch-git jq ])}:$PATH" - export CMAKE_PREFIX_PATH=${amentVendorNix} + export PATH="${lib.makeBinPath (with self; [ nix-prefetch-git jq nix ])}:$PATH" + # Ask CMake to generate vendored-source.json + export CMAKE_PREFIX_PATH=${rosSelf.ament-cmake-vendor-package-wrapped} + cmakeFlags+='-DAMENT_VENDOR_NIX_PREFETCH=ON' phases="''${prePhases[*]:-} unpackPhase patchPhase ''${preConfigurePhases[*]:-} configurePhase ''${preBuildPhases[*]:-}" \ genericBuild # Copy the resulting data to package source directory diff --git a/maintainers/scripts/update-ament-vendor.sh b/maintainers/scripts/update-ament-vendor.sh index 600c46e389..2ea8c2a6ca 100755 --- a/maintainers/scripts/update-ament-vendor.sh +++ b/maintainers/scripts/update-ament-vendor.sh @@ -10,10 +10,18 @@ set -euo pipefail # Run it from the top-level directory of this repo, i.e., # ./maintainers/scripts/update-ament-vendor.sh +# TODO: Remove after nixos-24.11 EOL +if nix-eval-jobs --show-input-drvs --expr null >/dev/null; then + # Needed since v2.26.0 + nix_eval_jobs="nix-eval-jobs --show-input-drvs" +else + nix_eval_jobs="nix-eval-jobs" +fi + # Find potential candidates for updating candidates=$( # Extract all rosPackages (ignoring eval errors) - nix-eval-jobs --expr '(import ./. {}).rosPackages' | + $nix_eval_jobs --expr '(import ./. {}).rosPackages' | # Select only packages that depend on ament-cmake-vendor-package jq -r 'select(.inputDrvs|objects|keys|any(contains("ament-cmake-vendor-package"))).attr')