all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#74671] [PATCH] gnu: freedesktop: Add `libsystemd`
@ 2024-12-03 15:44 Ryan Sundberg via Guix-patches via
  0 siblings, 0 replies; only message in thread
From: Ryan Sundberg via Guix-patches via @ 2024-12-03 15:44 UTC (permalink / raw)
  To: 74671; +Cc: Ryan Sundberg

Provide libsystemd.so and associated header files for linking against
systemd. While users may not wish to use systemd as an init system, some
programs may require this for their build process.

* gnu/packages/freedesktop.scm (libsystemd): New variable

Change-Id: I3f3b16e021ccca801693a0b8e1ba2d9cb040a952
Signed-off-by: Ryan Sundberg <ryan@arctype.co>
---
 gnu/packages/freedesktop.scm | 43 ++++++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)

diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index af35625c18..e2d2b60376 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -761,6 +761,49 @@ (define-public libinput-minimal
                "-Ddebug-gui=false"    ;requires gtk+@3
                ,flags))))))
 
+(define-public libsystemd
+  (package
+    (name "libsystemd")
+    (version "256.9")
+    (source
+      (origin
+        (method git-fetch)
+        (uri
+          (git-reference
+            (url "https://github.com/systemd/systemd.git")
+            (commit (string-append "v" version))))
+        (sha256
+          (base32
+            "0x7n2jwmwrprl0aqcaxw184r5x03047264ccrv24aivmf5fzk7iy"))))
+    (build-system meson-build-system)
+    (arguments
+      `(;; Don't test all of systemd
+        #:tests? #f
+        #:configure-flags (list (string-append "-Drootprefix=" %output))
+        #:phases (modify-phases %standard-phases
+                   (replace 'build
+                     (lambda* (#:key parallel-build? #:allow-other-keys)
+                       (invoke "ninja"
+                               "-j" (if parallel-build? (number->string (parallel-job-count)) "1")
+                               "libsystemd.so.0.39.0"
+                               "src/libsystemd/libsystemd.pc")))
+                   (replace 'install
+                     (lambda* (#:key outputs #:allow-other-keys)
+                       (invoke "meson" "install" "--no-rebuild" "--tags" "libsystemd")
+                       (let ((out (assoc-ref outputs "out")))
+                         (delete-file "../source/src/systemd/meson.build")
+                         (mkdir-p (string-append out "/lib/pkgconfig"))
+                         (install-file "./src/libsystemd/libsystemd.pc" (string-append out "/lib/pkgconfig"))
+                         (copy-recursively "../source/src/systemd" (string-append out "/include/systemd"))))))))
+    (inputs
+      (list gperf libcap libxcrypt (list util-linux "lib")))
+    (native-inputs
+      (list cmake pkg-config python python-jinja2))
+    (home-page "https://systemd.io/")
+    (synopsis "Functions for implementing services and interacting with systemd")
+    (description "The libsystemd library provides functions that allow interacting with various interfaces provided by the systemd(1) service manager, as well as various other functions and constants useful for implementing services in general.")
+    (license license:lgpl2.1+)))
+
 (define-public libxdg-basedir
   (package
     (name "libxdg-basedir")

base-commit: 32d1dfb5545bb01c9d8d7a2465f13f2f379dd96e
-- 
2.41.0





^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2024-12-03 15:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-03 15:44 [bug#74671] [PATCH] gnu: freedesktop: Add `libsystemd` Ryan Sundberg via Guix-patches via

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.