[bug#74723,11/19] gnu: Add ringbuffer.

Message ID 972c6786e2872aefb3b7883594eb7215dae78ff8.1733563475.git.sughosha@disroot.org
State New
Headers
Series gnu: lmms, carla: New features, fixes and updates. |

Commit Message

Sughosha Dec. 7, 2024, 12:20 p.m. UTC
  * gnu/packages/audio.scm (ringbuffer): New variable.

Change-Id: I92765a33ac38a947098a3aba1078adb1a1d622f5
---
 gnu/packages/audio.scm | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)
  

Patch

diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index 13ed6c7127..13c9e4d768 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -49,6 +49,7 @@ 
 ;;; Copyright © 2024 hapster <o.rojon@posteo.net>
 ;;; Copyright © 2024 mio <stigma@disroot.org>
 ;;; Copyright © 2024 Nikita Domnitskii <nikita@domnitskii.me>
+;;; Copyright © 2024 Sughosha <sughosha@disroot.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -3568,6 +3569,37 @@  (define-public pcaudiolib
                    (license:non-copyleft
                     "file://src/TPCircularBuffer/README.markdown")))))
 
+(define-public ringbuffer
+  (package
+    (name "ringbuffer")
+    (version "0.9.0")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/JohannesLorenz/ringbuffer")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1c57hj6zyvcjpcbwrq8c1hj5brk1bnh69ayd88ny1p0gx031sjpk"))))
+    (build-system cmake-build-system)
+    (arguments
+     (list #:configure-flags
+           #~(list (string-append "-DINSTALL_LIB_DIR=" #$output "/lib"))
+           #:phases
+           #~(modify-phases %standard-phases
+               (add-after 'install 'install-export-header
+                 (lambda _
+                   (install-file "src/lib/ringbuffer_export.h"
+                                 (string-append #$output
+                                                "/include/ringbuffer")))))))
+    (home-page "https://github.com/JohannesLorenz/ringbuffer")
+    (synopsis "Lock-free multi-reader ringbuffer")
+    (description
+     "@code{ringbuffer} is a library containing a ringbuffer.  It is lock-free
+(using atomics only), and allows multiple readers, but only one writer.")
+    (license license:gpl3+)))
+
 (define-public qjackctl
   (package
     (name "qjackctl")