From acd5a8225eaccd0300a465c6245bfa9e97daee9e Mon Sep 17 00:00:00 2001 From: Guilhem Saurel Date: Tue, 5 May 2026 22:18:24 +0200 Subject: [PATCH 1/3] xacro: init at 2.1.1 --- pkgs/by-name/xa/xacro/package.nix | 102 ++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 pkgs/by-name/xa/xacro/package.nix diff --git a/pkgs/by-name/xa/xacro/package.nix b/pkgs/by-name/xa/xacro/package.nix new file mode 100644 index 000000000000..0db43f7b0aed --- /dev/null +++ b/pkgs/by-name/xa/xacro/package.nix @@ -0,0 +1,102 @@ +{ + lib, + fetchFromGitHub, + + python3Packages, + + ament-cmake, + ament-cmake-export-definitions, + ament-cmake-export-include-directories, + ament-cmake-export-libraries, + ament-cmake-export-link-flags, + ament-cmake-export-targets, + ament-cmake-gen-version-h, + ament-cmake-include-directories, + ament-cmake-libraries, + ament-cmake-pytest, + ament-cmake-python, + ament-cmake-target-dependencies, + ament-cmake-test, + ament-cmake-version, + ament-lint-auto, + cmake, +}: + +python3Packages.buildPythonApplication (finalAttrs: { + pname = "xacro"; + version = "2.1.1"; + pyproject = false; # build with CMake to get tests + + src = fetchFromGitHub { + owner = "ros"; + repo = "xacro"; + tag = finalAttrs.version; + hash = "sha256-xYFwVM5qpy2/cYKtcf/v5sSlL2e/taIC4IQ48ZiRxiw="; + }; + + postPatch = '' + patchShebangs test/test-cmake.sh + ''; + + build-system = [ + cmake + python3Packages.setuptools + ]; + + buildInputs = [ + ament-cmake + ament-cmake-export-definitions + ament-cmake-export-include-directories + ament-cmake-export-libraries + ament-cmake-export-link-flags + ament-cmake-export-targets + ament-cmake-gen-version-h + ament-cmake-include-directories + ament-cmake-libraries + ament-cmake-python + ament-cmake-target-dependencies + ament-cmake-test + ament-cmake-version + ]; + + nativeCheckInputs = [ + python3Packages.pytest + ]; + + checkInputs = [ + python3Packages.ament-index-python + ament-lint-auto + ament-cmake-pytest + ]; + + dependencies = [ + python3Packages.ament-package + python3Packages.catkin-pkg + python3Packages.pyyaml + ]; + + cmakeFlags = [ + (lib.cmakeBool "BUILD_TESTING" finalAttrs.doInstallCheck) + ]; + + preInstallCheck = '' + export PATH=$out/bin:$PATH + export PYTHONPATH=$out/${python3Packages.python.sitePackages}:$PYTHONPATH + ''; + + installCheckTarget = "test"; + + pythonImportsCheck = [ "xacro" ]; + + strictDeps = true; + __structuredAttrs = true; + + meta = { + description = "Xacro is an XML macro language. With xacro, you can construct shorter and more readable XML files by using macros that expand to larger XML expressions"; + homepage = "https://github.com/ros/xacro"; + changelog = "https://github.com/ros/xacro/blob/${finalAttrs.src.rev}/CHANGELOG.rst"; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ nim65s ]; + mainProgram = "xacro"; + }; +}) From a5d2178c460e634ba4ce1f3f10805a2d628838d8 Mon Sep 17 00:00:00 2001 From: Guilhem Saurel Date: Tue, 5 May 2026 22:16:28 +0200 Subject: [PATCH 2/3] xacrodoc: init at 2.0.1 --- pkgs/by-name/xa/xacrodoc/package.nix | 54 ++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 pkgs/by-name/xa/xacrodoc/package.nix diff --git a/pkgs/by-name/xa/xacrodoc/package.nix b/pkgs/by-name/xa/xacrodoc/package.nix new file mode 100644 index 000000000000..c4b8491e599e --- /dev/null +++ b/pkgs/by-name/xa/xacrodoc/package.nix @@ -0,0 +1,54 @@ +{ + lib, + fetchFromGitHub, + + python3Packages, + xacro, +}: + +python3Packages.buildPythonApplication (finalAttrs: { + pname = "xacrodoc"; + version = "2.0.1"; + pyproject = true; + + src = fetchFromGitHub { + owner = "adamheins"; + repo = "xacrodoc"; + tag = "v${finalAttrs.version}"; + hash = "sha256-zuyd+lVcrz06yEgapoTjOZP+mxfOsk52rQE33aKV0qI="; + }; + + build-system = [ + python3Packages.hatchling + ]; + + dependencies = [ + python3Packages.rospkg + xacro + ]; + + optional-dependencies = { + mujoco = [ + python3Packages.mujoco + ]; + }; + + nativeCheckInputs = [ + python3Packages.pytestCheckHook + ]; + + pythonImportsCheck = [ + "xacrodoc" + ]; + + strictDeps = true; + __structuredAttrs = true; + + meta = { + description = "Compile xacro files to plain URDF or MJCF from Python or the command line (no ROS required)"; + homepage = "https://github.com/adamheins/xacrodoc"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ nim65s ]; + mainProgram = "xacrodoc"; + }; +}) From bc00f47c44f4cfe7bab2f260d17662da9a5e8247 Mon Sep 17 00:00:00 2001 From: Guilhem Saurel Date: Thu, 7 May 2026 00:28:05 +0200 Subject: [PATCH 3/3] xacro: no tests before #517456 --- pkgs/by-name/xa/xacro/package.nix | 64 +------------------------------ 1 file changed, 2 insertions(+), 62 deletions(-) diff --git a/pkgs/by-name/xa/xacro/package.nix b/pkgs/by-name/xa/xacro/package.nix index 0db43f7b0aed..e29be57edbc5 100644 --- a/pkgs/by-name/xa/xacro/package.nix +++ b/pkgs/by-name/xa/xacro/package.nix @@ -3,29 +3,12 @@ fetchFromGitHub, python3Packages, - - ament-cmake, - ament-cmake-export-definitions, - ament-cmake-export-include-directories, - ament-cmake-export-libraries, - ament-cmake-export-link-flags, - ament-cmake-export-targets, - ament-cmake-gen-version-h, - ament-cmake-include-directories, - ament-cmake-libraries, - ament-cmake-pytest, - ament-cmake-python, - ament-cmake-target-dependencies, - ament-cmake-test, - ament-cmake-version, - ament-lint-auto, - cmake, }: python3Packages.buildPythonApplication (finalAttrs: { pname = "xacro"; version = "2.1.1"; - pyproject = false; # build with CMake to get tests + pyproject = true; src = fetchFromGitHub { owner = "ros"; @@ -34,58 +17,15 @@ python3Packages.buildPythonApplication (finalAttrs: { hash = "sha256-xYFwVM5qpy2/cYKtcf/v5sSlL2e/taIC4IQ48ZiRxiw="; }; - postPatch = '' - patchShebangs test/test-cmake.sh - ''; - build-system = [ - cmake python3Packages.setuptools - ]; - - buildInputs = [ - ament-cmake - ament-cmake-export-definitions - ament-cmake-export-include-directories - ament-cmake-export-libraries - ament-cmake-export-link-flags - ament-cmake-export-targets - ament-cmake-gen-version-h - ament-cmake-include-directories - ament-cmake-libraries - ament-cmake-python - ament-cmake-target-dependencies - ament-cmake-test - ament-cmake-version - ]; - - nativeCheckInputs = [ - python3Packages.pytest - ]; - - checkInputs = [ - python3Packages.ament-index-python - ament-lint-auto - ament-cmake-pytest + python3Packages.setuptools-scm ]; dependencies = [ - python3Packages.ament-package - python3Packages.catkin-pkg python3Packages.pyyaml ]; - cmakeFlags = [ - (lib.cmakeBool "BUILD_TESTING" finalAttrs.doInstallCheck) - ]; - - preInstallCheck = '' - export PATH=$out/bin:$PATH - export PYTHONPATH=$out/${python3Packages.python.sitePackages}:$PYTHONPATH - ''; - - installCheckTarget = "test"; - pythonImportsCheck = [ "xacro" ]; strictDeps = true;