From c07358022a74a4c82de7fef392ece66788f3b35d Mon Sep 17 00:00:00 2001 From: Theodoros Foradis Date: Sat, 24 Jun 2017 00:05:13 +0300 Subject: gnu: Add libsigrokdecode. * gnu/packages/electronics.scm (libsigrokdecode): New variable. Signed-off-by: Danny Milosavljevic --- gnu/packages/electronics.scm | 50 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) (limited to 'gnu') 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+))) -- cgit 1.4.1