@@ -14,6 +14,7 @@
;;; Copyright © 2021 David Dashyan <mail@davie.li>
;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo@hotmail.com>
;;; Copyright © 2022 (unmatched parenthesis <paren@disroot.org>
+;;; Copyright © 2022 Antero Mejr <antero@mailbox.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -1134,3 +1135,31 @@ (define-public utf8-h
C and C++. The functions it provides are like those from the C header
string.h, but with a utf8* prefix instead of the str* prefix.")
(license license:unlicense))))
+
+(define-public nsync
+ (package
+ (name "nsync")
+ (version "1.24.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/google/nsync")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0737jcjw5nxv34zs7ppp6hqimb79k51kjiavgg0ygsfi22a6s0ld"))))
+ (build-system cmake-build-system)
+ (home-page "https://github.com/google/nsync")
+ (synopsis "C library for synchronization primitives")
+ (description
+ "nsync is a C library that exports various synchronization primitives:
+@enumerate
+@item locks
+@item condition variables
+@item run-once initialization
+@item waitable counter (useful for barriers)
+@item waitable bit (useful for cancellation, or other conditions)
+@end enumerate
+")
+ (license license:asl2.0)))