From a296725039be63094bc19f57a7257d31e2f2d4b5 Mon Sep 17 00:00:00 2001 From: Yueh-Shun Li Date: Fri, 21 Mar 2025 02:28:39 +0800 Subject: [PATCH 01/15] gz-cmake: init at 4.0.0 --- pkgs/by-name/gz/gz-cmake/package.nix | 47 ++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 pkgs/by-name/gz/gz-cmake/package.nix diff --git a/pkgs/by-name/gz/gz-cmake/package.nix b/pkgs/by-name/gz/gz-cmake/package.nix new file mode 100644 index 0000000000000..a06e9d6ae2069 --- /dev/null +++ b/pkgs/by-name/gz/gz-cmake/package.nix @@ -0,0 +1,47 @@ +{ + lib, + stdenv, + fetchFromGitHub, + nix-update-script, + cmake, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "gz-cmake"; + version = "4.0.0"; + + src = fetchFromGitHub { + owner = "gazebosim"; + repo = "gz-cmake"; + rev = "gz-cmake${lib.head (lib.splitString "." finalAttrs.version)}_${finalAttrs.version}"; + hash = "sha256-r1XQqx+JqH+ITZIaixgZjA/9weyPq8+LQ1N2ZsIdOK4="; + }; + + nativeBuildInputs = [ + cmake + ]; + + strictDeps = true; + + postPatch = '' + # Install under lib/cmake instead of share/cmake + substituteInPlace CMakeLists.txt \ + --replace-fail 'set(gz_config_install_dir "''${CMAKE_INSTALL_DATAROOTDIR}/cmake/''${PROJECT_NAME_LOWER}")' 'set(gz_config_install_dir "''${GZ_LIB_INSTALL_DIR}/cmake/''${PROJECT_NAME_LOWER}")' \ + ''; + + doCheck = true; + + passthru = { + updateScript = nix-update-script { }; + }; + + meta = { + description = "A set of CMake modules that are used by the C++-based Gazebo projects"; + homepage = "https://github.com/gazebosim/gz-cmake"; + changelog = "https://github.com/gazebosim/gz-cmake/blob/${finalAttrs.src.rev}/Changelog.md"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ ShamrockLee ]; + mainProgram = "gz-cmake"; + platforms = lib.platforms.all; + }; +}) From 55177a9d6fbb2e93d7a7a342d65c41f0ab36b237 Mon Sep 17 00:00:00 2001 From: Yueh-Shun Li Date: Fri, 21 Mar 2025 02:29:13 +0800 Subject: [PATCH 02/15] gz-utils: init at 3.0.0 --- pkgs/by-name/gz/gz-utils/package.nix | 48 ++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 pkgs/by-name/gz/gz-utils/package.nix diff --git a/pkgs/by-name/gz/gz-utils/package.nix b/pkgs/by-name/gz/gz-utils/package.nix new file mode 100644 index 0000000000000..ec7bdf8a900bc --- /dev/null +++ b/pkgs/by-name/gz/gz-utils/package.nix @@ -0,0 +1,48 @@ +{ + lib, + stdenv, + fetchFromGitHub, + nix-update-script, + cmake, + gz-cmake, + spdlog, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "gz-utils"; + version = "3.0.0"; + + src = fetchFromGitHub { + owner = "gazebosim"; + repo = "gz-utils"; + rev = "gz-utils${lib.head (lib.splitString "." finalAttrs.version)}_${finalAttrs.version}"; + hash = "sha256-maq0iGCGbrjVGwBNNIYYSAKXxszwlAJS4FLrGNxsA5c="; + }; + + nativeBuildInputs = [ + cmake + ]; + + buildInputs = [ + gz-cmake + spdlog + ]; + + strictDeps = true; + + doCheck = true; + + passthru = { + updateScript = nix-update-script { }; + }; + + meta = { + description = "Gazebo Utils, classes and functions for robot applications"; + homepage = "https://github.com/gazebosim/gz-utils"; + changelog = "https://github.com/gazebosim/gz-utils/blob/${finalAttrs.src.rev}/Changelog.md"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ ShamrockLee ]; + mainProgram = "gz-utils"; + platforms = lib.platforms.all; + }; +}) From 01ddfebc61767665e80b60e3bdf3c5d475f847c4 Mon Sep 17 00:00:00 2001 From: Yueh-Shun Li Date: Fri, 21 Mar 2025 03:33:57 +0800 Subject: [PATCH 03/15] gz-math: init at 8.0.0 --- pkgs/by-name/gz/gz-math/package.nix | 74 +++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 pkgs/by-name/gz/gz-math/package.nix diff --git a/pkgs/by-name/gz/gz-math/package.nix b/pkgs/by-name/gz/gz-math/package.nix new file mode 100644 index 0000000000000..466563acde730 --- /dev/null +++ b/pkgs/by-name/gz/gz-math/package.nix @@ -0,0 +1,74 @@ +{ + lib, + stdenv, + fetchFromGitHub, + nix-update-script, + cmake, + eigen, + gz-cmake, + gz-utils, +}: + +stdenv.mkDerivation (finalAttrs: { + __structuredAttrs = true; + pname = "gz-math"; + version = "8.0.0"; + + src = fetchFromGitHub { + owner = "gazebosim"; + repo = "gz-math"; + rev = "gz-math${lib.head (lib.splitString "." finalAttrs.version)}_${finalAttrs.version}"; + hash = "sha256-3+846hhsaBaiFLIURlXQx6Z1+VYfp9UZgjdl96JvrRw="; + }; + + nativeBuildInputs = [ + cmake + ]; + + buildInputs = [ + eigen + gz-cmake + gz-utils + ]; + + strictDeps = true; + + cmakeDefinitions = { + SKIP_SWIG = true; + SKIP_PYBIND11 = true; + }; + + cmakeFlags = + # TODO(@ShamrockLee): + # Remove after a unified way to specify CMake definitions becomes available. + lib.mapAttrsToList ( + n: v: + let + specifiedType = finalAttrs.cmakeDefinitionTypes.${n} or ""; + type = + if specifiedType != "" then + specifiedType + else if lib.isBool v then + "bool" + else + "string"; + in + if lib.toUpper type == "BOOL" then lib.cmakeBool n v else lib.cmakeOptionType type n v + ) finalAttrs.cmakeDefinitions; + + doCheck = true; + + passthru = { + updateScript = nix-update-script { }; + }; + + meta = { + description = "General purpose math library for robot applications"; + homepage = "https://github.com/gazebosim/gz-math"; + changelog = "https://github.com/gazebosim/gz-math/blob/${finalAttrs.src.rev}/Changelog.md"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ ShamrockLee ]; + mainProgram = "gz-math"; + platforms = lib.platforms.all; + }; +}) From 3df665e46ab0e9d8a89b90b5d1cf75cd7cc27109 Mon Sep 17 00:00:00 2001 From: Yueh-Shun Li Date: Fri, 21 Mar 2025 07:54:03 +0800 Subject: [PATCH 04/15] gz-common: init at 6.0.2 --- pkgs/by-name/gz/gz-common/package.nix | 190 ++++++++++++++++++++++++++ 1 file changed, 190 insertions(+) create mode 100644 pkgs/by-name/gz/gz-common/package.nix diff --git a/pkgs/by-name/gz/gz-common/package.nix b/pkgs/by-name/gz/gz-common/package.nix new file mode 100644 index 0000000000000..d5cfb955c11b9 --- /dev/null +++ b/pkgs/by-name/gz/gz-common/package.nix @@ -0,0 +1,190 @@ +{ + lib, + stdenv, + fetchFromGitHub, + fetchpatch, + nix-update-script, + cmake, + assimp, + ffmpeg, + freeimage, + gdal, + gz-cmake, + gz-math, + gz-utils, + libuuid, + spdlog, + tinyxml-2, +}: + +stdenv.mkDerivation (finalAttrs: { + __structuredAttrs = true; + pname = "gz-common"; + version = "6.0.2"; + + src = fetchFromGitHub { + owner = "gazebosim"; + repo = "gz-common"; + rev = "gz-common${lib.head (lib.splitString "." finalAttrs.version)}_${finalAttrs.version}"; + hash = "sha256-sY9g+AatS+ddYSUAjqumfZNi2JIc+DFbiVYMaWKMC78="; + }; + + nativeBuildInputs = [ + cmake + ]; + + buildInputs = + [ + gz-cmake + gz-utils + spdlog + libuuid + ] + ++ lib.optionals (!finalAttrs.cmakeDefinitions.SKIP_av) [ + ffmpeg + ] + ++ lib.optionals (!finalAttrs.cmakeDefinitions.SKIP_events) [ + gz-math + ] + ++ lib.optionals (!finalAttrs.cmakeDefinitions.SKIP_geospatial) [ + gdal + gz-math + ] + ++ lib.optionals (!finalAttrs.cmakeDefinitions.SKIP_graphics) [ + assimp + + # The package freeimage is currently marked unstable due to upstream inactivity, + # but gz-sim requires gz-common to compile with component graphics. + # See the gz-common upstream issue https://github.com/gazebosim/gz-common/issues/388 + freeimage + + gz-math + tinyxml-2 + ] + ++ lib.optionals (!finalAttrs.cmakeDefinitions.SKIP_io) [ + gz-math + ]; + + strictDeps = true; + + patches = [ + # Add missing #include for Event.hh that uses std::chrono + # From pull request https://github.com/gazebosim/gz-common/pull/664 + (fetchpatch { + url = "https://github.com/gazebosim/gz-common/commit/683493c6068c243e158f7e097af8d0ccde04b787.patch?full_inedx=1"; + hash = "sha256-e4b0UYm42t7LQQQHx/3Jco8V09PF4mScdGiBCkWS4AU="; + }) + ]; + + postPatch = '' + homeDirForTests="$PWD/test-home-dir" + mkdir -p "$homeDirForTests" + substituteInPlace src/SystemPaths_TEST.cc \ + --replace-fail 'homeDir = "/home"' "homeDir = \"$homeDirForTests\"" + ''; + + cmakeDefinitions = { + CMAKE_CXX_STANDARD = "23"; + SKIP_av = false; + SKIP_events = false; + SKIP_geospatial = false; + SKIP_graphics = false; + SKIP_io = false; + SKIP_profiler = false; + }; + + cmakeFlags = + # TODO(@ShamrockLee): + # Remove after a unified way to specify CMake definitions becomes available. + lib.mapAttrsToList ( + n: v: + let + specifiedType = finalAttrs.cmakeDefinitionTypes.${n} or ""; + type = + if specifiedType != "" then + specifiedType + else if lib.isBool v then + "bool" + else + "string"; + in + if lib.toUpper type == "BOOL" then lib.cmakeBool n v else lib.cmakeOptionType type n v + ) finalAttrs.cmakeDefinitions; + + doCheck = true; + + # Some test cases generate files (probably FIFOs or sockets) + # which cannot afford parallel running. + enableParallelChecking = false; + + preCheck = '' + export HOME="$homeDirForTests/alice" + mkdir -p "$HOME" + ''; + + postCheck = '' + rm -r "$homeDirForTests" + export HOME="/homeless-shelter" + ''; + + passthru = { + tests = + let + attrsNotSkipped = lib.filterAttrs (n: v: lib.hasPrefix "SKIP_" n && !v) finalAttrs.cmakeDefinitions; + in + lib.mapAttrs' ( + n: _: + let + component = lib.removePrefix "SKIP_" n; + in + { + name = "dependency-${component}"; + value = finalAttrs.finalPackage.overrideAttrs (previousAttrs: { + cmakeDefinitions = previousAttrs.cmakeDefinitions // lib.mapAttrs (n': _: n != n') attrsNotSkipped; + inherit component; + preConfigure = + '' + _cmakePath=$(type -p cmake) + cmake() { + "$_cmakePath" "$@" | tee -a cmake_output.log + } + '' + + previousAttrs.preConfigure or ""; + postConfigure = + previousAttrs.postConfigure or "" + + '' + unset cmake + if grep --fixed-strings "Skipping the component [$component] because the following packages are missing" cmake_output.log; then + echo "ERROR: dependencies of component $component is not satisfied." + exit 1 + fi + ''; + }); + } + ) attrsNotSkipped + // { + dependency-minimal = finalAttrs.finalPackage.overrideAttrs (previousAttrs: { + cmakeDefinitions = previousAttrs.cmakeDefinitions // lib.mapAttrs (n': _: true) attrsNotSkipped; + }); + }; + + updateScript = nix-update-script { }; + }; + + meta = { + description = "Gazebo common library"; + + longDescription = '' + ' + An audio-visual library supports processing audio and video files, + a graphics library can load a variety 3D mesh file formats into a generic in-memory representation, + and the core library of Gazebo Common containing functionality that spans Base64 encoding/decoding to thread pools + ''; + homepage = "https://github.com/gazebosim/gz-common"; + changelog = "https://github.com/gazebosim/gz-common/blob/${finalAttrs.src.rev}/Changelog.md"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ ShamrockLee ]; + mainProgram = "gz-common"; + platforms = lib.platforms.all; + }; +}) From 744118bfd4341496bad450b65cb3e27b03e4399e Mon Sep 17 00:00:00 2001 From: Yueh-Shun Li Date: Fri, 21 Mar 2025 10:56:03 +0800 Subject: [PATCH 05/15] gz-tools: init at 2.0.2 --- pkgs/by-name/gz/gz-tools/package.nix | 87 ++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 pkgs/by-name/gz/gz-tools/package.nix diff --git a/pkgs/by-name/gz/gz-tools/package.nix b/pkgs/by-name/gz/gz-tools/package.nix new file mode 100644 index 0000000000000..a5e03ee442af9 --- /dev/null +++ b/pkgs/by-name/gz/gz-tools/package.nix @@ -0,0 +1,87 @@ +{ + lib, + stdenv, + fetchFromGitHub, + nix-update-script, + cmake, + backward-cpp, + gz-cmake, + ruby, +}: + +stdenv.mkDerivation (finalAttrs: { + __structuredAttrs = true; + pname = "gz-tools"; + version = "2.0.2"; + + src = fetchFromGitHub { + owner = "gazebosim"; + repo = "gz-tools"; + rev = "gz-tools${lib.head (lib.splitString "." finalAttrs.version)}_${finalAttrs.version}"; + hash = "sha256-CY+W1jWIkszKwKuLgKmJpZMXHn0RnueMHFSDhOXIzLg="; + }; + + nativeBuildInputs = [ + cmake + ]; + + buildInputs = + [ + gz-cmake + ruby + ] + ++ lib.optionals finalAttrs.cmakeDefinitions.USE_SYSTEM_BACKWARDCPP [ + backward-cpp + ]; + + strictDeps = true; + + cmakeDefinitions = { + # gz-tools requires the system backward-cpp + # to provide BackwardCpp.cmake or backward-cpp.cmak, + # which is currently not the case in Nixpkgs. + USE_SYSTEM_BACKWARDCPP = false; + }; + + cmakeFlags = + # TODO(@ShamrockLee): + # Remove after a unified way to specify CMake definitions becomes available. + lib.mapAttrsToList ( + n: v: + let + specifiedType = finalAttrs.cmakeDefinitionTypes.${n} or ""; + type = + if specifiedType != "" then + specifiedType + else if lib.isBool v then + "bool" + else + "string"; + in + if lib.toUpper type == "BOOL" then lib.cmakeBool n v else lib.cmakeOptionType type n v + ) finalAttrs.cmakeDefinitions; + + passthru = { + tests = { + check = finalAttrs.finalPackage.overrideAttrs { + doCheck = true; + + nativeCheckInputs = [ + ruby + ]; + }; + }; + + updateScript = nix-update-script { }; + }; + + meta = { + description = "Command line tools for the Gazebo libraries"; + homepage = "https://github.com/gazebosim/gz-tools"; + changelog = "https://github.com/gazebosim/gz-tools/blob/${finalAttrs.src.rev}/Changelog.md"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ ShamrockLee ]; + mainProgram = "gz"; + platforms = lib.platforms.all; + }; +}) From 8ce516d9792126608b606f6bd2f551d732b505e4 Mon Sep 17 00:00:00 2001 From: Yueh-Shun Li Date: Fri, 21 Mar 2025 11:29:06 +0800 Subject: [PATCH 06/15] gz-msgs: init at 11.0.0 --- pkgs/by-name/gz/gz-msgs/package.nix | 56 +++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 pkgs/by-name/gz/gz-msgs/package.nix diff --git a/pkgs/by-name/gz/gz-msgs/package.nix b/pkgs/by-name/gz/gz-msgs/package.nix new file mode 100644 index 0000000000000..a3f6aa6466ed2 --- /dev/null +++ b/pkgs/by-name/gz/gz-msgs/package.nix @@ -0,0 +1,56 @@ +{ + lib, + stdenv, + fetchFromGitHub, + nix-update-script, + cmake, + python3, + gz-cmake, + gz-math, + gz-tools, + gz-utils, + protobuf, + tinyxml-2, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "gz-msgs"; + version = "11.0.0"; + + src = fetchFromGitHub { + owner = "gazebosim"; + repo = "gz-msgs"; + rev = "gz-msgs${lib.head (lib.splitString "." finalAttrs.version)}_${finalAttrs.version}"; + hash = "sha256-EGf8LJHq1YICUC5kvutJDyFIK7QnpiTjB8fxaOAOHyQ="; + }; + + nativeBuildInputs = [ + cmake + python3 + ]; + + buildInputs = [ + gz-cmake + gz-math + gz-tools + gz-utils + protobuf + tinyxml-2 + ]; + + strictDeps = true; + + passthru = { + updateScript = nix-update-script { }; + }; + + meta = { + description = "Messages for Gazebo robot simulation"; + homepage = "https://github.com/gazebosim/gz-msgs"; + changelog = "https://github.com/gazebosim/gz-msgs/blob/${finalAttrs.src.rev}/Changelog.md"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ ShamrockLee ]; + mainProgram = "gz-msgs"; + platforms = lib.platforms.all; + }; +}) From e6e0b30b6a7abf84c064a72c5775b91b0ff42b0a Mon Sep 17 00:00:00 2001 From: Yueh-Shun Li Date: Mon, 31 Mar 2025 08:28:37 +0800 Subject: [PATCH 07/15] gz-fuel-tools: init at 10.0.0 --- pkgs/by-name/gz/gz-fuel-tools/package.nix | 78 +++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 pkgs/by-name/gz/gz-fuel-tools/package.nix diff --git a/pkgs/by-name/gz/gz-fuel-tools/package.nix b/pkgs/by-name/gz/gz-fuel-tools/package.nix new file mode 100644 index 0000000000000..3b862fc11dc17 --- /dev/null +++ b/pkgs/by-name/gz/gz-fuel-tools/package.nix @@ -0,0 +1,78 @@ +{ + lib, + stdenv, + fetchFromGitHub, + nix-update-script, + cmake, + pkg-config, + curl, + gz-cmake, + gz-common, + gz-math, + gz-msgs, + gz-tools, + gz-utils, + jsoncpp, + libuuid, + libyaml, + libzip, + protobuf, + python3, + spdlog, + tinyxml-2, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "gz-fuel-tools"; + version = "10.0.0"; + + src = fetchFromGitHub { + owner = "gazebosim"; + repo = "gz-fuel-tools"; + rev = "gz-fuel-tools${lib.head (lib.splitString "." finalAttrs.version)}_${finalAttrs.version}"; + hash = "sha256-9WskZnci7D09aW32lzmdtlhRBM+hcmhG6iNgf3OC1js="; + }; + + nativeBuildInputs = [ + cmake + pkg-config + + # For standard CMake module FindPackageHandleStandardArgs.cmake + python3 + ]; + + buildInputs = [ + curl + gz-cmake + gz-common + gz-math + gz-msgs + gz-tools + gz-utils + jsoncpp + libyaml + libzip + protobuf + tinyxml-2 + + # For gz-common6-targets.cmake provided by gz-common + libuuid + spdlog + ]; + + strictDeps = true; + + passthru = { + updateScript = nix-update-script { }; + }; + + meta = { + description = "Client library and command line tools for interacting with Gazebo Fuel servers"; + homepage = "https://github.com/gazebosim/gz-fuel-tools"; + changelog = "https://github.com/gazebosim/gz-fuel-tools/blob/${finalAttrs.src.rev}/Changelog.md"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ ShamrockLee ]; + mainProgram = "gz-fuel-tools"; + platforms = lib.platforms.all; + }; +}) From face71d6ab92cc6d3d599594d4ef60cd187ec782 Mon Sep 17 00:00:00 2001 From: Yueh-Shun Li Date: Mon, 31 Mar 2025 20:23:42 +0800 Subject: [PATCH 08/15] [WIP] gz-sim: init at 9.0.0 --- pkgs/by-name/gz/gz-sim/package.nix | 97 ++++++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 pkgs/by-name/gz/gz-sim/package.nix diff --git a/pkgs/by-name/gz/gz-sim/package.nix b/pkgs/by-name/gz/gz-sim/package.nix new file mode 100644 index 0000000000000..267f633328954 --- /dev/null +++ b/pkgs/by-name/gz/gz-sim/package.nix @@ -0,0 +1,97 @@ +{ + lib, + stdenv, + fetchFromGitHub, + nix-update-script, + cmake, + gz-cmake, + gz-common, + gz-fuel-tools, + # gz-gui, + gz-math, + gz-msgs, + # gz-physics, + # gz-plugin, + # gz-rendoring, + # gz-sensors, + gz-tools, + # gz-transport, + gz-utils, + protobuf, +# sdformat, +}: + +stdenv.mkDerivation (finalAttrs: { + __structuredAttrs = true; + pname = "gz-sim"; + version = "9.0.0"; + + src = fetchFromGitHub { + owner = "gazebosim"; + repo = "gz-sim"; + rev = "gz-sim${lib.head (lib.splitString "." finalAttrs.version)}_${finalAttrs.version}"; + hash = "sha256-gsWKknqcTiJc4YHIkmg1YGItwHG1As2OUnpPBQIwqj8="; + }; + + nativeBuildInputs = [ + cmake + ]; + + buildInputs = [ + gz-cmake + gz-common + gz-fuel-tools + # gz-gui, + gz-math + gz-msgs + # gz-physics + # gz-plugin + # gz-rendering + # gz-sensors + gz-tools + # gz-transport + gz-utils + protobuf + # sdformat + ]; + + strictDeps = true; + + cmakeDefinitions = { + SKIP_PYBIND11 = true; + }; + + cmakeFlags = + # TODO(@ShamrockLee): + # Remove after a unified way to specify CMake definitions becomes available. + lib.mapAttrsToList ( + n: v: + let + specifiedType = finalAttrs.cmakeDefinitionTypes.${n} or ""; + type = + if specifiedType != "" then + specifiedType + else if lib.isBool v then + "bool" + else + "string"; + in + if lib.toUpper type == "BOOL" then lib.cmakeBool n v else lib.cmakeOptionType type n v + ) finalAttrs.cmakeDefinitions; + + doCheck = true; + + passthru = { + updateScript = nix-update-script { }; + }; + + meta = { + description = "Gazebo, the open source robotics simulator"; + homepage = "https://github.com/gazebosim/gz-sim"; + changelog = "https://github.com/gazebosim/gz-sim/blob/${finalAttrs.src.rev}/Changelog.md"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ ShamrockLee ]; + mainProgram = "gz-sim"; + platforms = lib.platforms.all; + }; +}) From 2ba34b7df57264c0fd12cae50d7666d9bd89c370 Mon Sep 17 00:00:00 2001 From: Ananth Venkatesh Date: Tue, 1 Apr 2025 22:28:09 -0400 Subject: [PATCH 09/15] gz-gui: init at 9.0.0 --- pkgs/by-name/gz/gz-gui/package.nix | 77 ++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 pkgs/by-name/gz/gz-gui/package.nix diff --git a/pkgs/by-name/gz/gz-gui/package.nix b/pkgs/by-name/gz/gz-gui/package.nix new file mode 100644 index 0000000000000..16b018ef0df23 --- /dev/null +++ b/pkgs/by-name/gz/gz-gui/package.nix @@ -0,0 +1,77 @@ +{ + lib, + stdenv, + fetchFromGitHub, + nix-update-script, + cmake, + gz-cmake, + gz-common, + gz-math, + gz-transport, + gz-msgs, + gz-plugin, + gz-tools +}: + +stdenv.mkDerivation (finalAttrs: { + __structuredAttrs = true; + pname = "gz-gui"; + version = "9.0.0"; + + src = fetchFromGitHub { + owner = "gazebosim"; + repo = "gz-gui"; + rev = "gz-gui${lib.head (lib.splitString "." finalAttrs.version)}_${finalAttrs.version}"; + hash = "sha256-/YJW6XmdGwbyd5Nx3wcTqnRlpwE1unVGaNX91qfZmiM="; + }; + + nativeBuildInputs = [ + cmake + ]; + + buildInputs = [ + gz-cmake + gz-common + gz-math + gz-transport + gz-msgs + gz-plugin + gz-tools + ]; + + strictDeps = true; + + cmakeFlags = + # TODO(@ShamrockLee): + # Remove after a unified way to specify CMake definitions becomes available. + lib.mapAttrsToList ( + n: v: + let + specifiedType = finalAttrs.cmakeDefinitionTypes.${n} or ""; + type = + if specifiedType != "" then + specifiedType + else if lib.isBool v then + "bool" + else + "string"; + in + if lib.toUpper type == "BOOL" then lib.cmakeBool n v else lib.cmakeOptionType type n v + ) finalAttrs.cmakeDefinitions; + + doCheck = true; + + passthru = { + updateScript = nix-update-script { }; + }; + + meta = { + description = "Builds on top of Qt to provide widgets which are useful when developing robotics applications, such as a 3D view, plots, dashboard, etc, and can be used together in a convenient unified interface"; + homepage = "https://github.com/gazebosim/gz-gui"; + changelog = "https://github.com/gazebosim/gz-gui/blob/${finalAttrs.src.rev}/Changelog.md"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ ShamrockLee ]; + mainProgram = "gz-gui"; + platforms = lib.platforms.all; + }; +}) From 96851cab39c7ba95a33eae4ee6862e4c0b46c8b5 Mon Sep 17 00:00:00 2001 From: Ananth Venkatesh Date: Tue, 1 Apr 2025 22:28:27 -0400 Subject: [PATCH 10/15] gz-physics: init at 8.0.0 --- pkgs/by-name/gz/gz-physics/package.nix | 73 ++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 pkgs/by-name/gz/gz-physics/package.nix diff --git a/pkgs/by-name/gz/gz-physics/package.nix b/pkgs/by-name/gz/gz-physics/package.nix new file mode 100644 index 0000000000000..da173cfc1b387 --- /dev/null +++ b/pkgs/by-name/gz/gz-physics/package.nix @@ -0,0 +1,73 @@ +{ + lib, + stdenv, + fetchFromGitHub, + nix-update-script, + cmake, + gz-cmake, + gz-common, + gz-math, + gz-plugin, + libsdformat +}: + +stdenv.mkDerivation (finalAttrs: { + __structuredAttrs = true; + pname = "gz-physics"; + version = "8.0.0"; + + src = fetchFromGitHub { + owner = "gazebosim"; + repo = "gz-physics"; + rev = "gz-physics${lib.head (lib.splitString "." finalAttrs.version)}_${finalAttrs.version}"; + hash = "sha256-PjwrJG3xvRYrkHDTaBUgoaW8NglEYDPuJrk4QjJjTHU="; + }; + + nativeBuildInputs = [ + cmake + ]; + + buildInputs = [ + gz-cmake + gz-common + gz-math + gz-plugin + libsdformat + ]; + + strictDeps = true; + + cmakeFlags = + # TODO(@ShamrockLee): + # Remove after a unified way to specify CMake definitions becomes available. + lib.mapAttrsToList ( + n: v: + let + specifiedType = finalAttrs.cmakeDefinitionTypes.${n} or ""; + type = + if specifiedType != "" then + specifiedType + else if lib.isBool v then + "bool" + else + "string"; + in + if lib.toUpper type == "BOOL" then lib.cmakeBool n v else lib.cmakeOptionType type n v + ) finalAttrs.cmakeDefinitions; + + doCheck = true; + + passthru = { + updateScript = nix-update-script { }; + }; + + meta = { + description = "Abstract physics interface designed to support simulation and rapid development of robot applications"; + homepage = "https://github.com/gazebosim/gz-physics"; + changelog = "https://github.com/gazebosim/gz-physics/blob/${finalAttrs.src.rev}/Changelog.md"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ ShamrockLee ]; + mainProgram = "gz-physics"; + platforms = lib.platforms.all; + }; +}) From d67e884d45da52223e98734764000e26ba813caa Mon Sep 17 00:00:00 2001 From: Ananth Venkatesh Date: Tue, 1 Apr 2025 22:29:31 -0400 Subject: [PATCH 11/15] gz-rendering: init at 9.0.0 --- pkgs/by-name/gz/gz-rendering/package.nix | 71 ++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 pkgs/by-name/gz/gz-rendering/package.nix diff --git a/pkgs/by-name/gz/gz-rendering/package.nix b/pkgs/by-name/gz/gz-rendering/package.nix new file mode 100644 index 0000000000000..430588d69ec97 --- /dev/null +++ b/pkgs/by-name/gz/gz-rendering/package.nix @@ -0,0 +1,71 @@ +{ + lib, + stdenv, + fetchFromGitHub, + nix-update-script, + cmake, + gz-cmake, + gz-common, + gz-math, + gz-plugin +}: + +stdenv.mkDerivation (finalAttrs: { + __structuredAttrs = true; + pname = "gz-rendering"; + version = "9.0.0"; + + src = fetchFromGitHub { + owner = "gazebosim"; + repo = "gz-rendering"; + rev = "gz-rendering${lib.head (lib.splitString "." finalAttrs.version)}_${finalAttrs.version}"; + hash = "sha256-e3OPLeqV6OgjnQrbpwRj59e7Z0BqN2wOee/gAaMHfqU="; + }; + + nativeBuildInputs = [ + cmake + ]; + + buildInputs = [ + gz-cmake + gz-common + gz-math + gz-plugin + ]; + + strictDeps = true; + + cmakeFlags = + # TODO(@ShamrockLee): + # Remove after a unified way to specify CMake definitions becomes available. + lib.mapAttrsToList ( + n: v: + let + specifiedType = finalAttrs.cmakeDefinitionTypes.${n} or ""; + type = + if specifiedType != "" then + specifiedType + else if lib.isBool v then + "bool" + else + "string"; + in + if lib.toUpper type == "BOOL" then lib.cmakeBool n v else lib.cmakeOptionType type n v + ) finalAttrs.cmakeDefinitions; + + doCheck = true; + + passthru = { + updateScript = nix-update-script { }; + }; + + meta = { + description = "C++ library designed to provide an abstraction for different rendering engines"; + homepage = "https://github.com/gazebosim/gz-rendering"; + changelog = "https://github.com/gazebosim/gz-rendering/blob/${finalAttrs.src.rev}/Changelog.md"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ ShamrockLee ]; + mainProgram = "gz-rendering"; + platforms = lib.platforms.all; + }; +}) From f1624678fc23edf96a51fbfb0ad58db47ac103ca Mon Sep 17 00:00:00 2001 From: Ananth Venkatesh Date: Tue, 1 Apr 2025 22:29:44 -0400 Subject: [PATCH 12/15] gz-sensors: init at 9.0.0 --- pkgs/by-name/gz/gz-sensors/package.nix | 75 ++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 pkgs/by-name/gz/gz-sensors/package.nix diff --git a/pkgs/by-name/gz/gz-sensors/package.nix b/pkgs/by-name/gz/gz-sensors/package.nix new file mode 100644 index 0000000000000..d8dccede7e12c --- /dev/null +++ b/pkgs/by-name/gz/gz-sensors/package.nix @@ -0,0 +1,75 @@ +{ + lib, + stdenv, + fetchFromGitHub, + nix-update-script, + cmake, + gz-cmake, + gz-common, + gz-math, + gz-transport, + gz-msgs, + gz-rendering +}: + +stdenv.mkDerivation (finalAttrs: { + __structuredAttrs = true; + pname = "gz-sensors"; + version = "9.0.0"; + + src = fetchFromGitHub { + owner = "gazebosim"; + repo = "gz-sensors"; + rev = "gz-gui${lib.head (lib.splitString "." finalAttrs.version)}_${finalAttrs.version}"; + hash = "sha256-8Ato7/YRL7JebbVPASD6VF9lf/Uyq26MIg2l+jQ4GDk="; + }; + + nativeBuildInputs = [ + cmake + ]; + + buildInputs = [ + gz-cmake + gz-common + gz-math + gz-transport + gz-msgs + gz-rendering + ]; + + strictDeps = true; + + cmakeFlags = + # TODO(@ShamrockLee): + # Remove after a unified way to specify CMake definitions becomes available. + lib.mapAttrsToList ( + n: v: + let + specifiedType = finalAttrs.cmakeDefinitionTypes.${n} or ""; + type = + if specifiedType != "" then + specifiedType + else if lib.isBool v then + "bool" + else + "string"; + in + if lib.toUpper type == "BOOL" then lib.cmakeBool n v else lib.cmakeOptionType type n v + ) finalAttrs.cmakeDefinitions; + + doCheck = true; + + passthru = { + updateScript = nix-update-script { }; + }; + + meta = { + description = "Provides numerous sensor models designed to generate realistic data from simulation environments"; + homepage = "https://github.com/gazebosim/gz-sensors"; + changelog = "https://github.com/gazebosim/gz-sensors/blob/${finalAttrs.src.rev}/Changelog.md"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ ShamrockLee ]; + mainProgram = "gz-sensors"; + platforms = lib.platforms.all; + }; +}) From 37ccc9003ef254357597709ff5f6df4318ce8b35 Mon Sep 17 00:00:00 2001 From: Ananth Venkatesh Date: Tue, 1 Apr 2025 22:30:01 -0400 Subject: [PATCH 13/15] gz-transport: init at 14.0.0 --- pkgs/by-name/gz/gz-transport/package.nix | 69 ++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 pkgs/by-name/gz/gz-transport/package.nix diff --git a/pkgs/by-name/gz/gz-transport/package.nix b/pkgs/by-name/gz/gz-transport/package.nix new file mode 100644 index 0000000000000..084ffc815b01a --- /dev/null +++ b/pkgs/by-name/gz/gz-transport/package.nix @@ -0,0 +1,69 @@ +{ + lib, + stdenv, + fetchFromGitHub, + nix-update-script, + cmake, + gz-cmake, + gz-msgs, + gz-tools +}: + +stdenv.mkDerivation (finalAttrs: { + __structuredAttrs = true; + pname = "gz-transport"; + version = "14.0.0"; + + src = fetchFromGitHub { + owner = "gazebosim"; + repo = "gz-transport"; + rev = "gz-transport${lib.head (lib.splitString "." finalAttrs.version)}_${finalAttrs.version}"; + hash = "sha256-zoGphy2cpmqJsnyS1LNVm4eGtHCWkAwIblga4RdVj4k="; + }; + + nativeBuildInputs = [ + cmake + ]; + + buildInputs = [ + gz-cmake + gz-msgs + gz-tools + ]; + + strictDeps = true; + + cmakeFlags = + # TODO(@ShamrockLee): + # Remove after a unified way to specify CMake definitions becomes available. + lib.mapAttrsToList ( + n: v: + let + specifiedType = finalAttrs.cmakeDefinitionTypes.${n} or ""; + type = + if specifiedType != "" then + specifiedType + else if lib.isBool v then + "bool" + else + "string"; + in + if lib.toUpper type == "BOOL" then lib.cmakeBool n v else lib.cmakeOptionType type n v + ) finalAttrs.cmakeDefinitions; + + doCheck = true; + + passthru = { + updateScript = nix-update-script { }; + }; + + meta = { + description = "Transport library for component communication based on publication/subscription and service calls"; + homepage = "https://github.com/gazebosim/gz-transport"; + changelog = "https://github.com/gazebosim/gz-transport/blob/${finalAttrs.src.rev}/Changelog.md"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ ShamrockLee ]; + mainProgram = "gz-transport"; + platforms = lib.platforms.all; + }; +}) From f648eb934e6cd802ed0b3ad991709dceaa914509 Mon Sep 17 00:00:00 2001 From: Ananth Venkatesh Date: Tue, 1 Apr 2025 22:30:27 -0400 Subject: [PATCH 14/15] gz-plugin: init at 3.0.0 --- pkgs/by-name/gz/gz-plugin/package.nix | 65 +++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 pkgs/by-name/gz/gz-plugin/package.nix diff --git a/pkgs/by-name/gz/gz-plugin/package.nix b/pkgs/by-name/gz/gz-plugin/package.nix new file mode 100644 index 0000000000000..41b7c09edae88 --- /dev/null +++ b/pkgs/by-name/gz/gz-plugin/package.nix @@ -0,0 +1,65 @@ +{ + lib, + stdenv, + fetchFromGitHub, + nix-update-script, + cmake, + gz-cmake +}: + +stdenv.mkDerivation (finalAttrs: { + __structuredAttrs = true; + pname = "gz-plugin"; + version = "3.0.0"; + + src = fetchFromGitHub { + owner = "gazebosim"; + repo = "gz-plugin"; + rev = "gz-plugin${lib.head (lib.splitString "." finalAttrs.version)}_${finalAttrs.version}"; + hash = "sha256-h2Dx0KcFmJlS67q0v1zbd9nQkTCKgHkxt5KKTT5v+fw="; + }; + + nativeBuildInputs = [ + cmake + ]; + + buildInputs = [ + gz-cmake + ]; + + strictDeps = true; + + cmakeFlags = + # TODO(@ShamrockLee): + # Remove after a unified way to specify CMake definitions becomes available. + lib.mapAttrsToList ( + n: v: + let + specifiedType = finalAttrs.cmakeDefinitionTypes.${n} or ""; + type = + if specifiedType != "" then + specifiedType + else if lib.isBool v then + "bool" + else + "string"; + in + if lib.toUpper type == "BOOL" then lib.cmakeBool n v else lib.cmakeOptionType type n v + ) finalAttrs.cmakeDefinitions; + + doCheck = true; + + passthru = { + updateScript = nix-update-script { }; + }; + + meta = { + description = "Cross-platform C++ library for dynamically loading plugins"; + homepage = "https://github.com/gazebosim/gz-plugin"; + changelog = "https://github.com/gazebosim/gz-plugin/blob/${finalAttrs.src.rev}/Changelog.md"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ ShamrockLee ]; + mainProgram = "gz-plugin"; + platforms = lib.platforms.all; + }; +}) From 6672604df0a7b244d102ee949a58963bdd0c7bb9 Mon Sep 17 00:00:00 2001 From: Ananth Venkatesh Date: Tue, 1 Apr 2025 22:31:06 -0400 Subject: [PATCH 15/15] gz-sim: add most dependencies --- pkgs/by-name/gz/gz-sim/package.nix | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/pkgs/by-name/gz/gz-sim/package.nix b/pkgs/by-name/gz/gz-sim/package.nix index 267f633328954..d1d1efcd75b9b 100644 --- a/pkgs/by-name/gz/gz-sim/package.nix +++ b/pkgs/by-name/gz/gz-sim/package.nix @@ -7,15 +7,15 @@ gz-cmake, gz-common, gz-fuel-tools, - # gz-gui, + gz-gui, gz-math, gz-msgs, - # gz-physics, - # gz-plugin, - # gz-rendoring, - # gz-sensors, + gz-physics, + gz-plugin, + gz-rendering, + gz-sensors, gz-tools, - # gz-transport, + gz-transport, gz-utils, protobuf, # sdformat, @@ -41,15 +41,15 @@ stdenv.mkDerivation (finalAttrs: { gz-cmake gz-common gz-fuel-tools - # gz-gui, + gz-gui gz-math gz-msgs - # gz-physics - # gz-plugin - # gz-rendering - # gz-sensors + gz-physics + gz-plugin + gz-rendering + gz-sensors gz-tools - # gz-transport + gz-transport gz-utils protobuf # sdformat