From 9ddb59f45291d38bb385fc513ccb2ebcbbb0c1cb Mon Sep 17 00:00:00 2001 From: "Artyom V. Poptsov" Date: Mon, 29 Jan 2024 21:29:46 +0300 Subject: [PATCH] gnu: Add go-github-com-coreos-go-systemd-sdjournal. * gnu/packages/golang.scm (go-github-com-coreos-go-systemd-sdjournal): New variable. Change-Id: I48d6d6e888ab757363a16bae9f50c1ff955f287a Signed-off-by: Sharlatan Hellseher --- gnu/packages/golang-xyz.scm | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/gnu/packages/golang-xyz.scm b/gnu/packages/golang-xyz.scm index 625abaf25b..41821af92b 100644 --- a/gnu/packages/golang-xyz.scm +++ b/gnu/packages/golang-xyz.scm @@ -33,6 +33,7 @@ (define-module (gnu packages golang-xyz) #:use-module (guix packages) #:use-module (guix utils) #:use-module (gnu packages) + #:use-module (gnu packages freedesktop) #:use-module (gnu packages golang) #:use-module (gnu packages golang-build) #:use-module (gnu packages golang-check) @@ -298,6 +299,30 @@ (define-public go-github-com-coreos-go-systemd-machine1 (description "Go bindings to systemd for registering machines/containers."))) +(define-public go-github-com-coreos-go-systemd-sdjournal + (package + (inherit go-github-com-coreos-go-systemd-activation) + (name "go-github-com-coreos-go-systemd-sdjournal") + (arguments + '(#:tests? #f ;Tests require D-Bus daemon running. + #:import-path "github.com/coreos/go-systemd/sdjournal" + #:unpack-path "github.com/coreos/go-systemd" + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'fix-sdjournal-header + (lambda* (#:key import-path #:allow-other-keys) + (substitute* (format #f + "src/~a/journal.go" + import-path) + (("systemd/sd-journal.h") + "elogind/sd-journal.h") + (("systemd/sd-id128.h") + "elogind/sd-id128.h"))))))) + (inputs (list elogind)) + (synopsis "Go bindings to systemd for journald") + (description "Go bindings to systemd for reading from journald by wrapping +its C API."))) + (define-public go-github-com-coreos-go-systemd-unit (package (inherit go-github-com-coreos-go-systemd-activation)