diff --git a/pkgs/by-name/xa/xacro/package.nix b/pkgs/by-name/xa/xacro/package.nix new file mode 100644 index 000000000000..e29be57edbc5 --- /dev/null +++ b/pkgs/by-name/xa/xacro/package.nix @@ -0,0 +1,42 @@ +{ + lib, + fetchFromGitHub, + + python3Packages, +}: + +python3Packages.buildPythonApplication (finalAttrs: { + pname = "xacro"; + version = "2.1.1"; + pyproject = true; + + src = fetchFromGitHub { + owner = "ros"; + repo = "xacro"; + tag = finalAttrs.version; + hash = "sha256-xYFwVM5qpy2/cYKtcf/v5sSlL2e/taIC4IQ48ZiRxiw="; + }; + + build-system = [ + python3Packages.setuptools + python3Packages.setuptools-scm + ]; + + dependencies = [ + python3Packages.pyyaml + ]; + + 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"; + }; +}) 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"; + }; +})