From 61b4b6aea29b24f4a1c6af7d8f4e1c416ab41c86 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Mon, 21 Mar 2022 12:12:49 +0200 Subject: gnu: Add atomic-queue. * gnu/packages/cpp.scm (atomic-queue): New variable. --- gnu/packages/cpp.scm | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'gnu/packages') diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm index eb53f9e0a9..bb7f5ab95a 100644 --- a/gnu/packages/cpp.scm +++ b/gnu/packages/cpp.scm @@ -28,6 +28,7 @@ ;;; Copyright © 2022 Efraim Flashner ;;; Copyright © 2022 muradm ;;; Copyright © 2022 Attila Lendvai +;;; Copyright © 2022 Arun Isaac ;;; ;;; This file is part of GNU Guix. ;;; @@ -53,6 +54,7 @@ #:use-module (guix build-system cmake) #:use-module (guix build-system copy) #:use-module (guix build-system gnu) + #:use-module (guix build-system meson) #:use-module (guix build-system python) #:use-module (guix modules) #:use-module (guix gexp) @@ -1274,6 +1276,44 @@ provides a number of utilities to make coding with expected cleaner.") (home-page "https://tl.tartanllama.xyz/") (license license:cc0))) +(define-public atomic-queue + (package + (name "atomic-queue") + (version "1.0") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/max0x7ba/atomic_queue") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0ssff73wlvrsk2nma99dmvm0ijyzfr54jk37kxgpb694r7ajc90l")))) + (build-system meson-build-system) + (arguments + `(#:configure-flags '("-Dbenchmarks=false") + #:phases + (modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (lambda _ + (invoke "make" "run_tests"))))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (copy-recursively "../source/include/atomic_queue" + (string-append (assoc-ref outputs "out") + "/include/atomic_queue"))))))) + (native-inputs + (list boost + pkg-config)) + (home-page "https://github.com/max0x7ba/atomic_queue") + (synopsis "C++ lockless queue") + (description + "This package contains a C++11 multiple-producer-multiple-consumer lockless +queues header library based on circular buffer with @code{std::atomic}.") + (license license:expat))) + (define-public magic-enum (package (name "magic-enum") -- cgit v1.2.3