gz-cmake: 4.2.0 -> 5.0.0, gz-utils: 3.1.1 -> 4.0.0 (#467775)

This commit is contained in:
Michael Daniels
2026-03-16 00:42:55 +00:00
committed by GitHub
2 changed files with 22 additions and 11 deletions
+20 -9
View File
@@ -3,6 +3,7 @@
stdenv,
fetchFromGitHub,
cmake,
cppcheck,
doxygen,
graphviz,
pkg-config,
@@ -10,7 +11,7 @@
nix-update-script,
}:
let
version = "4.2.0";
version = "5.0.0";
versionPrefix = "gz-cmake${lib.versions.major version}";
in
stdenv.mkDerivation (finalAttrs: {
@@ -21,33 +22,42 @@ stdenv.mkDerivation (finalAttrs: {
owner = "gazebosim";
repo = "gz-cmake";
tag = "${versionPrefix}_${finalAttrs.version}";
hash = "sha256-+bMOcGWfcwPhxR9CBp4iH02CZC4oplCjsTDpPDsDnSs=";
hash = "sha256-XF7oglj9Xr6F8a+6uowrY5a040yl4FZlFfW/Y0BJwOs=";
};
postPatch = ''
patchShebangs examples/test_c_child_requires_c_no_deps.bash
substituteInPlace examples/CMakeLists.txt --replace-fail \
"$""{CMAKE_INSTALL_LIBDIR}" "${if stdenv.hostPlatform.isDarwin then "lib" else "lib64"}"
substituteInPlace examples/CMakeLists.txt \
--replace-fail "$""{CMAKE_INSTALL_LIBDIR}" "${
if stdenv.hostPlatform.isDarwin then "lib" else "lib64"
}"
'';
nativeBuildInputs = [
cmake
cppcheck
doxygen
graphviz
pkg-config
python3
];
doBuildExamples = false;
cmakeFlags = [
(lib.cmakeBool "BUILDSYSTEM_TESTING" finalAttrs.doCheck)
(lib.cmakeBool "BUILD_TESTING" finalAttrs.doCheck)
(lib.cmakeBool "BUILD_EXAMPLES" finalAttrs.doBuildExamples)
];
nativeCheckInputs = [ python3 ];
doCheck = true;
# Extract the version by matching the tag's prefix.
passthru.updateScript = nix-update-script {
extraArgs = [ "--version-regex=${versionPrefix}_([\\d\\.]+)" ];
passthru = {
# bulk updater selects wrong tag
skipBulkUpdates = true;
updateScript = nix-update-script {
extraArgs = [ "--version-regex=gz-cmake(.*)" ];
};
};
meta = {
@@ -57,5 +67,6 @@ stdenv.mkDerivation (finalAttrs: {
license = lib.licenses.asl20;
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [ guelakais ];
badPlatforms = lib.platforms.darwin; # hard replicable building error
};
})
+2 -2
View File
@@ -21,13 +21,13 @@
}:
stdenv.mkDerivation (finalAttrs: {
pname = "gz-utils";
version = "3.1.1";
version = "4.0.0";
src = fetchFromGitHub {
owner = "gazebosim";
repo = "gz-utils";
tag = "gz-utils${lib.versions.major finalAttrs.version}_${finalAttrs.version}";
hash = "sha256-fYzysdB608jfMb/EbqiGD4hXmPxcaVTUrt9Wx0dBlto=";
hash = "sha256-fZonC/o5CNHdK/R3IgEoo1llehy36MwvXPQCgFnP8Ls=";
};
outputs = [