Skip to content

gz-cmake: init at 4.1.1#400606

Merged
drupol merged 1 commit intoNixOS:masterfrom
Guelakais:gz_cmake
Apr 23, 2025
Merged

gz-cmake: init at 4.1.1#400606
drupol merged 1 commit intoNixOS:masterfrom
Guelakais:gz_cmake

Conversation

@Guelakais
Copy link
Contributor

@Guelakais Guelakais commented Apr 21, 2025

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@github-actions github-actions bot added 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Apr 21, 2025
Copy link
Contributor

@drupol drupol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Diff LGTM, I'll wait for another reviewer to have a look at this before merging.

@Guelakais Guelakais requested a review from drupol April 22, 2025 07:45
@drupol
Copy link
Contributor

drupol commented Apr 22, 2025

I just made a review, why are you again requesting a review from me?

@Guelakais
Copy link
Contributor Author

I just made a review, why are you again requesting a review from me?

According to github you have requested a change and therefore merging is blocked. Is this a technical error or do you still want changes?

Copy link
Contributor

@drupol drupol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What worries me in this PR is that it might not be picked up for automatic update by the bot because the version attribute is set to 4.1.1, while the tags on the repository have a different pattern.

I don't really know what's best to do here, this is the reason why I'd like someone else to have a look.

@drupol
Copy link
Contributor

drupol commented Apr 23, 2025

Here's a diff fixing the issue and remove the extra dependency to ruby which seems to be not needed.

diff --git a/pkgs/by-name/gz/gz-cmake/package.nix b/pkgs/by-name/gz/gz-cmake/package.nix
index ad8654503d..094ecfc2ab 100644
--- a/pkgs/by-name/gz/gz-cmake/package.nix
+++ b/pkgs/by-name/gz/gz-cmake/package.nix
@@ -4,21 +4,21 @@
   fetchFromGitHub,
   cmake,
   pkg-config,
-  ruby,
   doxygen,
   graphviz,
 }:
 let
-  version = "4.1.1";
-  tag_version = "${lib.versions.major version}_${version}";
+  tag = "gz-cmake4_4.1.1";
+  version = lib.head (lib.tail (lib.splitString "_" tag));
 in
 stdenv.mkDerivation (finalAttrs: {
   pname = "gz-cmake";
   version = version;
+
   src = fetchFromGitHub {
     owner = "gazebosim";
     repo = "gz-cmake";
-    tag = "gz-cmake${tag_version}";
+    inherit tag;
     hash = "sha256-BWgRm+3UW65Cu7TqXtFFG05JlYF52dbpAsIE8aDnJM0=";
   };
 
@@ -29,10 +29,6 @@
     graphviz
   ];
 
-  buildInputs = [
-    ruby
-  ];
-
   cmakeFlags = [
     "-DBUILD_TESTING=OFF"
   ];
@@ -40,7 +36,7 @@
   meta = {
     description = "CMake modules to build Gazebo projects";
     homepage = "https://github.com/gazebosim/gz-cmake";
-    changelog = "https://github.com/gazebosim/gz-cmake/releases/tag/gz-cmake${tag_version}";
+    changelog = "https://github.com/gazebosim/gz-cmake/releases/tag/${tag}";
     license = lib.licenses.asl20;
     platforms = lib.platforms.unix;
     maintainers = with lib.maintainers; [ guelakais ];

@Guelakais Guelakais force-pushed the gz_cmake branch 2 times, most recently from 268fd69 to 2cefab3 Compare April 23, 2025 10:04
@Guelakais
Copy link
Contributor Author

Here's a diff fixing the issue and remove the extra dependency to ruby which seems to be not needed.

diff --git a/pkgs/by-name/gz/gz-cmake/package.nix b/pkgs/by-name/gz/gz-cmake/package.nix
index ad8654503d..094ecfc2ab 100644
--- a/pkgs/by-name/gz/gz-cmake/package.nix
+++ b/pkgs/by-name/gz/gz-cmake/package.nix
@@ -4,21 +4,21 @@
   fetchFromGitHub,
   cmake,
   pkg-config,
-  ruby,
   doxygen,
   graphviz,
 }:
 let
-  version = "4.1.1";
-  tag_version = "${lib.versions.major version}_${version}";
+  tag = "gz-cmake4_4.1.1";
+  version = lib.head (lib.tail (lib.splitString "_" tag));
 in
 stdenv.mkDerivation (finalAttrs: {
   pname = "gz-cmake";
   version = version;
+
   src = fetchFromGitHub {
     owner = "gazebosim";
     repo = "gz-cmake";
-    tag = "gz-cmake${tag_version}";
+    inherit tag;
     hash = "sha256-BWgRm+3UW65Cu7TqXtFFG05JlYF52dbpAsIE8aDnJM0=";
   };
 
@@ -29,10 +29,6 @@
     graphviz
   ];
 
-  buildInputs = [
-    ruby
-  ];
-
   cmakeFlags = [
     "-DBUILD_TESTING=OFF"
   ];
@@ -40,7 +36,7 @@
   meta = {
     description = "CMake modules to build Gazebo projects";
     homepage = "https://github.com/gazebosim/gz-cmake";
-    changelog = "https://github.com/gazebosim/gz-cmake/releases/tag/gz-cmake${tag_version}";
+    changelog = "https://github.com/gazebosim/gz-cmake/releases/tag/${tag}";
     license = lib.licenses.asl20;
     platforms = lib.platforms.unix;
     maintainers = with lib.maintainers; [ guelakais ];

done

@GaetanLepage
Copy link
Contributor

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 400606


x86_64-linux

✅ 1 package built:
  • gz-cmake

aarch64-linux

✅ 1 package built:
  • gz-cmake

x86_64-darwin

✅ 1 package built:
  • gz-cmake

aarch64-darwin

✅ 1 package built:
  • gz-cmake

@GaetanLepage
Copy link
Contributor

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 400606


x86_64-linux

✅ 1 package built:
  • gz-cmake

aarch64-linux

✅ 1 package built:
  • gz-cmake

x86_64-darwin

✅ 1 package built:
  • gz-cmake

aarch64-darwin

✅ 1 package built:
  • gz-cmake

Copy link
Contributor

@GaetanLepage GaetanLepage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@GaetanLepage GaetanLepage requested a review from drupol April 23, 2025 12:03
@drupol drupol merged commit 3e0a941 into NixOS:master Apr 23, 2025
23 of 27 checks passed
@drupol
Copy link
Contributor

drupol commented Apr 23, 2025

After asking on Matrix about this and being wrong on how the tag/version should be handled, I merged it.

Thanks !

@Guelakais
Copy link
Contributor Author

Now comes the hard part: packaging ament_cmake!

@Guelakais Guelakais moved this to ✅ Done in ROS 2 Apr 24, 2025
@Guelakais Guelakais added this to ROS 2 Apr 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants