diff mbox series

[1/1] package/rust-coreutils:new package

Message ID 20241208134004.143901-1-shirokovalexs@gmail.com
State New
Headers show
Series [1/1] package/rust-coreutils:new package | expand

Commit Message

Alexander Shirokov Dec. 8, 2024, 1:40 p.m. UTC
The Rust version aims to be a drop-in replacement for GNU coreutils,
designed to work across a wide range of platforms. Adding it to
Buildroot can help make it available on embedded devices.

This is the initial version of the package, supporting only the
multicall version (single binary). It allows starting to work with the
utilities while avoiding complex configurations and conflicts with
existing tools.

Signed-off-by: Alexander Shirokov <shirokovalexs@gmail.com>
---
 package/Config.in                          |  1 +
 package/rust-coreutils/Config.in           | 12 ++++++++++++
 package/rust-coreutils/rust-coreutils.hash |  3 +++
 package/rust-coreutils/rust-coreutils.mk   | 13 +++++++++++++
 4 files changed, 29 insertions(+)
 create mode 100644 package/rust-coreutils/Config.in
 create mode 100644 package/rust-coreutils/rust-coreutils.hash
 create mode 100644 package/rust-coreutils/rust-coreutils.mk
diff mbox series

Patch

diff --git a/package/Config.in b/package/Config.in
index 60cdb179a3..48b1d96b4e 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -2874,6 +2874,7 @@  menu "System tools"
 	source "package/rauc-hawkbit-updater/Config.in"
 	source "package/rsyslog/Config.in"
 	source "package/runc/Config.in"
+	source "package/rust-coreutils/Config.in"
 	source "package/s390-tools/Config.in"
 	source "package/s6/Config.in"
 	source "package/s6-linux-init/Config.in"
diff --git a/package/rust-coreutils/Config.in b/package/rust-coreutils/Config.in
new file mode 100644
index 0000000000..0371805925
--- /dev/null
+++ b/package/rust-coreutils/Config.in
@@ -0,0 +1,12 @@ 
+config BR2_PACKAGE_RUST_COREUTILS
+	bool "rust-coreutils"
+	depends on BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS
+	select BR2_PACKAGE_HOST_RUSTC
+	help
+	  Rust coreutils is a cross-platform reimplementation of the GNU
+	  coreutils, aiming to be a drop-in replacement.
+
+	  Select this option to build a multicall binary, named
+	  'coreutils'.
+
+	  https://github.com/uutils/coreutils
diff --git a/package/rust-coreutils/rust-coreutils.hash b/package/rust-coreutils/rust-coreutils.hash
new file mode 100644
index 0000000000..bb8e4ac6ca
--- /dev/null
+++ b/package/rust-coreutils/rust-coreutils.hash
@@ -0,0 +1,3 @@ 
+# Locally calculated
+sha256  28e7c79e608989af331fface204fd922eec2a22c4aa2c43a91dced884b6de8d2  rust-coreutils-0.0.28-cargo2.tar.gz
+sha256  29953405eaa3dcc41c37d1621d55b6a47eee93e05613e439e73295029740b10c  LICENSE
diff --git a/package/rust-coreutils/rust-coreutils.mk b/package/rust-coreutils/rust-coreutils.mk
new file mode 100644
index 0000000000..ca41f7101a
--- /dev/null
+++ b/package/rust-coreutils/rust-coreutils.mk
@@ -0,0 +1,13 @@ 
+################################################################################
+#
+# rust-coreutils
+#
+################################################################################
+
+RUST_COREUTILS_VERSION = 0.0.28
+RUST_COREUTILS_SITE = $(call github,uutils,coreutils,$(RUST_COREUTILS_VERSION))
+RUST_COREUTILS_LICENSE = MIT
+RUST_COREUTILS_LICENSE_FILES = LICENSE
+RUST_COREUTILS_CPE_ID_VALID = YES
+
+$(eval $(cargo-package))