Subject: [PATCH] gnu: Add "go-github-com-coreos-go-systemd" sub-packages.
From: "Artyom V. Poptsov" <[email-masked]>
To: [email-masked]
Date: Wed, 17 Jan 2024 22:53:18 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

Hello,

this patch set adds most of the missing sub-packages for
"go-systemd"[1].

I wasn't able to package "sdjournal" as it requires systemd headers
which are seems to be not present in Guix at the moment.
From 790fc4be076e488bbbfcecd2dffba66bf884cf99 Mon Sep 17 00:00:00 2001
Message-ID: <790fc4[email-masked]>
From: "Artyom V. Poptsov" <[email-masked]>
Date: Wed, 17 Jan 2024 22:25:00 +0300
Subject: [PATCH 1/6] gnu: Add go-github-com-coreos-go-systemd-daemon.

* gnu/packages/golang.scm (go-github-com-coreos-go-systemd-daemon): New
  variable.

Change-Id: If79215d0676b9bb8dfe6e12a144a9b156f43f9be
---
 gnu/packages/golang.scm | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 8fea581248..3499c21b8b 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -9272,6 +9272,19 @@ (define-public go-github-com-coreos-go-systemd-activation
 using socket activation from Go.")
     (license license:asl2.0)))
 
+(define-public go-github-com-coreos-go-systemd-daemon
+  (package
+    (inherit go-github-com-coreos-go-systemd-activation)
+    (name "go-github-com-coreos-go-systemd-daemon")
+    (arguments
+     '(#:import-path "github.com/coreos/go-systemd/daemon"
+       #:unpack-path "github.com/coreos/go-systemd"))
+    (home-page "https://github.com/coreos/go-systemd")
+    (synopsis "Go bindings to systemd for notifications")
+    (description "Go bindings to systemd for notifying the daemon of service status
+changes")
+    (license license:asl2.0)))
+
 (define-public go-github-com-emirpasic-gods
   (package
     (name "go-github-com-emirpasic-gods")

base-commit: 8ca490e6600c55b2dab5db12cf1aefa2b1b27f9a
-- 
2.41.0

From e0f4fb0a916138d4ad8ae12f4be28d6d4b9c1a2a Mon Sep 17 00:00:00 2001
Message-ID: <e0f4fb[email-masked]>
In-Reply-To: <790fc4[email-masked]>
References: <790fc4[email-masked]>
From: "Artyom V. Poptsov" <[email-masked]>
Date: Wed, 17 Jan 2024 22:34:12 +0300
Subject: [PATCH 2/6] gnu: Add go-github-com-coreos-go-systemd-dbus.

* gnu/packages/golang.scm (go-github-com-coreos-go-systemd-dbus): New
  variable.

Change-Id: Ib50ff86ec7c03fd8b5e732dc9b3ec5e4196d8d3b
---
 gnu/packages/golang.scm | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 3499c21b8b..17f880ef97 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -9285,6 +9285,22 @@ (define-public go-github-com-coreos-go-systemd-daemon
 changes")
     (license license:asl2.0)))
 
+(define-public go-github-com-coreos-go-systemd-dbus
+  (package
+    (inherit go-github-com-coreos-go-systemd-activation)
+    (name "go-github-com-coreos-go-systemd-dbus")
+    (arguments
+     '(#:tests? #f ;Tests require D-Bus daemon running.
+       #:import-path "github.com/coreos/go-systemd/dbus"
+       #:unpack-path "github.com/coreos/go-systemd"))
+    (native-inputs (list go-github-com-godbus-dbus))
+    (home-page "https://github.com/coreos/go-systemd")
+    (synopsis "Go bindings to systemd for managing services")
+    (description
+     "Go bindings to systemd for starting/stopping/inspecting running services and
+units.")
+    (license license:asl2.0)))
+
 (define-public go-github-com-emirpasic-gods
   (package
     (name "go-github-com-emirpasic-gods")
-- 
2.41.0

From fa03c3fc20d98df436c6db31d41d4a272d512a6e Mon Sep 17 00:00:00 2001
Message-ID: <fa03c3[email-masked]>
In-Reply-To: <790fc4[email-masked]>
References: <790fc4[email-masked]>
From: "Artyom V. Poptsov" <[email-masked]>
Date: Wed, 17 Jan 2024 22:38:38 +0300
Subject: [PATCH 3/6] gnu: Add go-github-com-coreos-go-systemd-journal.

* gnu/packages/golang.scm (go-github-com-coreos-go-systemd-journal): New
  variable.

Change-Id: I6a8ae9d416ce7c4236ce0d8a8388da130964144c
---
 gnu/packages/golang.scm | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 17f880ef97..8f0298c1cb 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -9301,6 +9301,21 @@ (define-public go-github-com-coreos-go-systemd-dbus
 units.")
     (license license:asl2.0)))
 
+(define-public go-github-com-coreos-go-systemd-journal
+  (package
+    (inherit go-github-com-coreos-go-systemd-activation)
+    (name "go-github-com-coreos-go-systemd-journal")
+    (arguments
+     '(#:tests? #f ;Tests require access to journald socket.
+       #:import-path "github.com/coreos/go-systemd/journal"
+       #:unpack-path "github.com/coreos/go-systemd"))
+    (home-page "https://github.com/coreos/go-systemd")
+    (synopsis "Go bindings to systemd for writing journald")
+    (description
+     "Go bindings to systemd for writing to systemd's logging service,
+journald.")
+    (license license:asl2.0)))
+
 (define-public go-github-com-emirpasic-gods
   (package
     (name "go-github-com-emirpasic-gods")
-- 
2.41.0

From aecdd94e009199f88a2b9d03f651964d0b7f944c Mon Sep 17 00:00:00 2001
Message-ID: <aecdd9[email-masked]>
In-Reply-To: <790fc4[email-masked]>
References: <790fc4[email-masked]>
From: "Artyom V. Poptsov" <[email-masked]>
Date: Wed, 17 Jan 2024 22:43:37 +0300
Subject: [PATCH 4/6] gnu: Add go-github-com-coreos-go-systemd-login1.

* gnu/packages/golang.scm (go-github-com-coreos-go-systemd-login1): New
  variable.

Change-Id: I815e67c119b00232a620004f72e6b61d90d2c06a
---
 gnu/packages/golang.scm | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 8f0298c1cb..40cc864341 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -9316,6 +9316,21 @@ (define-public go-github-com-coreos-go-systemd-journal
 journald.")
     (license license:asl2.0)))
 
+(define-public go-github-com-coreos-go-systemd-login1
+  (package
+    (inherit go-github-com-coreos-go-systemd-activation)
+    (name "go-github-com-coreos-go-systemd-login1")
+    (arguments
+     '(#:tests? #f ;Tests require D-Bus daemon running.
+       #:import-path "github.com/coreos/go-systemd/login1"
+       #:unpack-path "github.com/coreos/go-systemd"))
+    (native-inputs (list go-github-com-godbus-dbus))
+    (home-page "https://github.com/coreos/go-systemd")
+    (synopsis "Go bindings to systemd for integration with logind API")
+    (description
+     "Go bindings to systemd for integration with the systemd logind API.")
+    (license license:asl2.0)))
+
 (define-public go-github-com-emirpasic-gods
   (package
     (name "go-github-com-emirpasic-gods")
-- 
2.41.0

From 5d9893550632c97143d2dcc28f8f9025e2dcaf5c Mon Sep 17 00:00:00 2001
Message-ID: <5d9893[email-masked]>
In-Reply-To: <790fc4[email-masked]>
References: <790fc4[email-masked]>
From: "Artyom V. Poptsov" <[email-masked]>
Date: Wed, 17 Jan 2024 22:46:31 +0300
Subject: [PATCH 5/6] gnu: Add go-github-com-coreos-go-systemd-machine1.

* gnu/packages/golang.scm (go-github-com-coreos-go-systemd-machine1): New
  variable.

Change-Id: I2d9340a2b70dd68e24e4a88bdcd1f4c289100c6d
---
 gnu/packages/golang.scm | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 40cc864341..5c2c2eb407 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -9331,6 +9331,20 @@ (define-public go-github-com-coreos-go-systemd-login1
      "Go bindings to systemd for integration with the systemd logind API.")
     (license license:asl2.0)))
 
+(define-public go-github-com-coreos-go-systemd-machine1
+  (package
+    (inherit go-github-com-coreos-go-systemd-activation)
+    (name "go-github-com-coreos-go-systemd-machine1")
+    (arguments
+     '(#:tests? #f ;Tests require D-Bus daemon running.
+       #:import-path "github.com/coreos/go-systemd/machine1"
+       #:unpack-path "github.com/coreos/go-systemd"))
+    (native-inputs (list go-github-com-godbus-dbus))
+    (home-page "https://github.com/coreos/go-systemd")
+    (synopsis "Go bindings to systemd for registering machines/containers")
+    (description "Go bindings to systemd for registering machines/containers.")
+    (license license:asl2.0)))
+
 (define-public go-github-com-emirpasic-gods
   (package
     (name "go-github-com-emirpasic-gods")
-- 
2.41.0

From c193b9a4b34b4f63ff57c7990aea160f0f443998 Mon Sep 17 00:00:00 2001
Message-ID: <c193b9[email-masked]>
In-Reply-To: <790fc4[email-masked]>
References: <790fc4[email-masked]>
From: "Artyom V. Poptsov" <[email-masked]>
Date: Wed, 17 Jan 2024 22:48:36 +0300
Subject: [PATCH 6/6] gnu: Add go-github-com-coreos-go-systemd-unit.

* gnu/packages/golang.scm (go-github-com-coreos-go-systemd-unit): New
  variable.

Change-Id: I4103a0a8a3fe8f0efe4e21b053cecda9825efdc1
---
 gnu/packages/golang.scm | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 5c2c2eb407..a2d697bebd 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -9345,6 +9345,22 @@ (define-public go-github-com-coreos-go-systemd-machine1
     (description "Go bindings to systemd for registering machines/containers.")
     (license license:asl2.0)))
 
+(define-public go-github-com-coreos-go-systemd-unit
+  (package
+    (inherit go-github-com-coreos-go-systemd-activation)
+    (name "go-github-com-coreos-go-systemd-unit")
+    (arguments
+     '(#:tests? #f ;Tests require D-Bus daemon running.
+       #:import-path "github.com/coreos/go-systemd/unit"
+       #:unpack-path "github.com/coreos/go-systemd"))
+    (native-inputs (list go-github-com-godbus-dbus))
+    (home-page "https://github.com/coreos/go-systemd")
+    (synopsis "Go bindings to systemd for working with unit files")
+    (description
+     "Go bindings to systemd for (de)serialization and comparison of unit
+files.")
+    (license license:asl2.0)))
+
 (define-public go-github-com-emirpasic-gods
   (package
     (name "go-github-com-emirpasic-gods")
-- 
2.41.0

Thanks,
- avp

References:
1. https://github.com/coreos/go-systemd

-- 
Artyom "avp" Poptsov <[email-masked]>
Home page: https://memory-heap.org/~avp/
CADR Hackerspace co-founder: https://cadrspace.ru/
GPG: D0C2 EAC1 3310 822D 98DE  B57C E9C5 A2D9 0898 A02F