From c01f652b2d01044ff71b09806f791c87d50fb5fc Mon Sep 17 00:00:00 2001 From: Luis Guilherme Coelho Date: Tue, 15 Oct 2024 13:41:30 -0300 Subject: [PATCH] packages: linux: Add bustd --- radix/packages/crates-io.scm | 77 ++++++++++++++++++++++++++++++++++++ radix/packages/linux.scm | 39 +++++++++++++++++- 2 files changed, 114 insertions(+), 2 deletions(-) diff --git a/radix/packages/crates-io.scm b/radix/packages/crates-io.scm index 7fffe48..4fc318b 100644 --- a/radix/packages/crates-io.scm +++ b/radix/packages/crates-io.scm @@ -920,6 +920,30 @@ Argument Parser.") "This package provides Easy Ctrl-C handler for Rust projects.") (license (list license:expat license:asl2.0)))) +(define-public rust-daemonize-0.4 + (package + (name "rust-daemonize") + (version "0.4.1") + (source + (origin + (method url-fetch) + (uri (crate-uri "daemonize" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "05cqr2zjxrxyg23snykd03sgqwxn0pvwj2lzh50bclsgwc9lbhkh")))) + (build-system cargo-build-system) + (arguments + `(#:cargo-inputs (("rust-boxfnonce" ,rust-boxfnonce-0.1) + ("rust-libc" ,rust-libc-0.2)) + #:cargo-development-inputs (("rust-tempdir" ,rust-tempdir-0.3)))) + (home-page "https://github.com/knsd/daemonize") + (synopsis + "Library to enable your code run as a daemon process on Unix-like systems") + (description + "This package provides Library to enable your code run as a daemon process +on Unix-like systems.") + (license (list license:expat license:asl2.0)))) + (define-public rust-deranged-0.3 (package (name "rust-deranged") @@ -2325,6 +2349,34 @@ in order to be used in Cargo build scripts.") for x86.") (license (list license:asl2.0 license:expat)))) +(define-public rust-procfs-0.9 + (package + (name "rust-procfs") + (version "0.9.1") + (source + (origin + (method url-fetch) + (uri (crate-uri "procfs" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "1kfmlpx902czawrn54zbs0918k0bxi22lv931zds4l44q7h0k25b")))) + (build-system cargo-build-system) + (arguments + `(#:cargo-inputs (("rust-backtrace" ,rust-backtrace-0.3) + ("rust-bitflags" ,rust-bitflags-1) + ("rust-byteorder" ,rust-byteorder-1) + ("rust-chrono" ,rust-chrono-0.4) + ("rust-flate2" ,rust-flate2-1) + ("rust-hex" ,rust-hex-0.4) + ("rust-lazy-static" ,rust-lazy-static-1) + ("rust-libc" ,rust-libc-0.2)) + #:cargo-development-inputs (("rust-procinfo" ,rust-procinfo-0.4)))) + (home-page "https://github.com/eminence/procfs") + (synopsis "Interface to the linux procfs pseudo-filesystem") + (description + "This package provides Interface to the linux procfs pseudo-filesystem.") + (license (list license:expat license:asl2.0)))) + (define-public rust-proc-macro2-1 (package (name "rust-proc-macro2") @@ -4960,3 +5012,28 @@ combinators library.") (description "This package provides Custom derive for traits from the zerocopy crate.") (license (list license:bsd-2 license:asl2.0 license:expat)))) + +(define-public rust-procfs-0.14 + (package + (name "rust-procfs") + (version "0.14.2") + (source + (origin + (method url-fetch) + (uri (crate-uri "procfs" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "0sdv4r3gikcz12qzb4020rlcq7vn8kh72vgwmvk7fgw7n2n8vpmi")))) + (build-system cargo-build-system) + (arguments + `(#:skip-build? #t + #:cargo-inputs (("rust-bitflags" ,rust-bitflags-1) + ("rust-byteorder" ,rust-byteorder-1) + ("rust-hex" ,rust-hex-0.4) + ("rust-lazy-static" ,rust-lazy-static-1) + ("rust-rustix" ,rust-rustix-0.36)))) + (home-page "https://github.com/eminence/procfs") + (synopsis "Interface to the linux procfs pseudo-filesystem") + (description + "This package provides Interface to the linux procfs pseudo-filesystem.") + (license (list license:expat license:asl2.0)))) diff --git a/radix/packages/linux.scm b/radix/packages/linux.scm index 006975d..70c4aaa 100644 --- a/radix/packages/linux.scm +++ b/radix/packages/linux.scm @@ -1,7 +1,14 @@ (define-module (radix packages linux) - #:use-module (guix packages) + #:use-module (gnu packages crates-io) + #:use-module (gnu packages crates-windows) + #:use-module (gnu packages linux) + #:use-module (guix build-system cargo) + #:use-module (guix download) #:use-module (guix gexp) - #:use-module (gnu packages linux)) + #:use-module (guix git-download) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix packages) + #:use-module (radix packages crates-io)) (define-public thinkfan-next (package @@ -18,3 +25,31 @@ (substitute* "CMakeLists.txt" (("/etc" directory) (string-append #$output directory)))))))))) + +(define-public bustd + (package + (name "bustd") + (version "0.1.1") + (source + (origin + (method url-fetch) + (uri (crate-uri "bustd" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "0byz7ml2vcdgmdxw1kmdbja83541w2pwcri82kfc4fdi8fr3100j")))) + (build-system cargo-build-system) + (arguments + `(#:cargo-inputs (("rust-argh" ,rust-argh-0.1) + ("rust-cc" ,rust-cc-1) + ("rust-cfg-if" ,rust-cfg-if-1) + ("rust-daemonize" ,rust-daemonize-0.4) + ("rust-glob" ,rust-glob-0.3) + ("rust-libc" ,rust-libc-0.2) + ("rust-memchr" ,rust-memchr-2) + ("rust-procfs" ,rust-procfs-0.9)))) + (home-page "https://github.com/vrmiguel/bustd") + (synopsis "Lightweight process killer daemon for out-of-memory scenarios") + (description + "This package provides Lightweight process killer daemon for out-of-memory +scenarios.") + (license license:expat)))