Subject: [bug#27355] [PATCH 3/7] gnu: Add libsigrokdecode.

From: Theodoros Foradis <[email-masked]>
Date: Wed, 14 Jun 2017 12:58:09 +0300

* gnu/packages/electronics.scm (libsigrokdecode): New variable.
---
 gnu/packages/electronics.scm | 32 +++++++++++++++++++++++++++++++-
 1 file changed, 31 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/electronics.scm b/gnu/packages/electronics.scm
index 53c7316df..90b025680 100644
--- a/gnu/packages/electronics.scm
+++ b/gnu/packages/electronics.scm
@@ -22,7 +22,11 @@
  #:use-module (guix download)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix build-system gnu)
- #:use-module (gnu packages))
+ #:use-module (gnu packages)
+ #:use-module (gnu packages check)
+ #:use-module (gnu packages glib)
+ #:use-module (gnu packages pkg-config)
+ #:use-module (gnu packages python))
 
 (define-public libserialport
   (package
@@ -42,3 +46,29 @@
     (description "Libserialport is a minimal shared library written in C that is intended
 to take care of the OS-specific details when writing software that uses serial ports.")
     (license license:lgpl3+)))
+
+(define-public libsigrokdecode
+  (package
+    (name "libsigrokdecode")
+    (version "0.5.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "http://sigrok.org/download/source/libsigrokdecode/libsigrokdecode-"
+                    version ".tar.gz"))
+              (sha256
+               (base32
+                "1hfigfj1976qk11kfsgj75l20qvyq8c9p2h4mjw23d59rsg5ga2a"))))
+    (native-inputs
+     `(("check" ,check)
+       ("pkg-config" ,pkg-config)))
+    ;; libsigrokdecode.pc lists "python" in Requires.private, and "glib" in Requires.
+    (propagated-inputs
+     `(("glib" ,glib)
+       ("python" ,python)))
+    (build-system gnu-build-system)
+    (home-page "http://www.sigrok.org/wiki/Libsigrokdecode")
+    (synopsis "Library providing (streaming) protocol decoding functionality")
+    (description "Libsigrokdecode is a shared library written in C, which provides
+(streaming) protocol decoding functionality.")
+    (license license:gpl3+)))
-- 
2.13.1