summary refs log tree commit diff
diff options
context:
space:
mode:
authorTheodoros Foradis <theodoros.for@openmailbox.org>2017-06-24 00:05:13 +0300
committerDanny Milosavljevic <dannym@scratchpost.org>2017-06-24 07:50:26 +0200
commitc07358022a74a4c82de7fef392ece66788f3b35d (patch)
tree0f89f9e88e5a1e06669bb159b3270be1966e80f7
parent03d0cc116001d2bac4204925c9d169ec3a58323f (diff)
downloadguix-c07358022a74a4c82de7fef392ece66788f3b35d.tar.gz
gnu: Add libsigrokdecode.
* gnu/packages/electronics.scm (libsigrokdecode): New variable.

Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
-rw-r--r--gnu/packages/electronics.scm50
1 files changed, 49 insertions, 1 deletions
diff --git a/gnu/packages/electronics.scm b/gnu/packages/electronics.scm
index 4abe9eea65..a62b06dc56 100644
--- a/gnu/packages/electronics.scm
+++ b/gnu/packages/electronics.scm
@@ -22,7 +22,14 @@
   #: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 documentation)
+  #:use-module (gnu packages glib)
+  #:use-module (gnu packages graphviz)
+  #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages python))
+
 
 (define-public libserialport
   (package
@@ -42,3 +49,44 @@
     (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"))))
+    (outputs '("out" "doc"))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'build 'build-doc
+           (lambda _
+             (zero? (system* "doxygen"))))
+         (add-after 'install 'install-doc
+           (lambda* (#:key outputs #:allow-other-keys)
+             (copy-recursively "doxy/html-api"
+                               (string-append (assoc-ref outputs "doc")
+                                              "/share/doc/libsigrokdecode"))
+             #t)))))
+    (native-inputs
+     `(("check" ,check)
+       ("doxygen" ,doxygen)
+       ("graphviz" ,graphviz)
+       ("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+)))