From: Theodoros Foradis <theodoros.for@openmailbox.org>
To: 27355@debbugs.gnu.org
Subject: [bug#27355] [PATCH 5/7] gnu: Add libsigrok.
Date: Wed, 14 Jun 2017 12:58:11 +0300 [thread overview]
Message-ID: <20170614095813.1926-5-theodoros.for@openmailbox.org> (raw)
In-Reply-To: <20170614095813.1926-1-theodoros.for@openmailbox.org>
* gnu/packages/electronics.scm (libsigrok): New variable.
---
gnu/packages/electronics.scm | 76 +++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 75 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/electronics.scm b/gnu/packages/electronics.scm
index d1edb008d..fce31fa28 100644
--- a/gnu/packages/electronics.scm
+++ b/gnu/packages/electronics.scm
@@ -24,10 +24,15 @@
#:use-module (guix build-system gnu)
#:use-module (gnu packages)
#:use-module (gnu packages check)
+ #:use-module (gnu packages compression)
+ #:use-module (gnu packages documentation)
#:use-module (gnu packages glib)
+ #:use-module (gnu packages libftdi)
+ #:use-module (gnu packages libusb)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
- #:use-module (gnu packages sdcc))
+ #:use-module (gnu packages sdcc)
+ #:use-module (gnu packages zip))
(define-public libserialport
(package
@@ -94,3 +99,72 @@ to take care of the OS-specific details when writing software that uses serial p
(description "Fx2lafw is free firmware for Cypress FX2 chips which makes them usable
as simple logic analyzer and/or oscilloscope hardware.")
(license license:gpl2+)))
+
+(define-public libsigrok
+ (package
+ (name "libsigrok")
+ (version "0.5.0")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "http://sigrok.org/download/source/libsigrok/libsigrok-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "197kr5ip98lxn7rv10zs35d1w0j7265s0xvckx0mq2l8kdvqd32c"))))
+ (arguments
+ `(#:tests? #f ; tests need usb access
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'configure 'change-udev-group
+ (lambda _
+ (let ((file "contrib/z60_libsigrok.rules"))
+ (substitute* file
+ (("plugdev") "dialout"))
+ (rename-file file "contrib/60-libsigrok.rules")
+ #t)))
+ (add-after 'install 'install-udev-rules
+ (lambda* (#:key outputs #:allow-other-keys)
+ (install-file "contrib/60-libsigrok.rules"
+ (string-append
+ (assoc-ref outputs "out")
+ "/lib/udev/rules.d/"))))
+ (add-after 'install-eudev-rules 'install-fw
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((fx2lafw (assoc-ref inputs "sigrok-firmware-fx2lafw"))
+ (out (assoc-ref outputs "out"))
+ (dir "/share/sigrok-firmware/")
+ (input-dir (string-append fx2lafw dir))
+ (output-dir (string-append out dir)))
+ (mkdir-p output-dir)
+ (for-each
+ (lambda (file)
+ (install-file file output-dir))
+ (find-files input-dir ".")))
+ #t)))))
+ (native-inputs
+ `(("check" ,check)
+ ("doxygen" ,doxygen)
+ ("sigrok-firmware-fx2lafw" ,sigrok-firmware-fx2lafw)
+ ("pkg-config" ,pkg-config)))
+ (inputs
+ `(("python" ,python)
+ ("zlib" ,zlib)))
+ ;; libsigrokcxx.pc lists "glibmm" in Requires
+ ;; libsigrok.pc lists "libserialport", "libusb", "libftdi" and "libzip" in
+ ;; Requires.private and "glib" in Requires.
+ (propagated-inputs
+ `(("glib" ,glib)
+ ("glibmm" ,glibmm)
+ ("libserialport" ,libserialport)
+ ("libusb" ,libusb)
+ ("libftdi" ,libftdi)
+ ("libzip" ,libzip)))
+ (build-system gnu-build-system)
+ (home-page "http://www.sigrok.org/wiki/Libsigrok")
+ (synopsis "Library which provides the basic hardware access drivers for logic
+analyzers")
+ (description "Libsigrok is a shared library written in C, which provides the basic hardware
+access drivers for logic analyzers and other supported devices, as well as input/output file
+format support.")
+ (license license:gpl3+)))
--
2.13.1
next prev parent reply other threads:[~2017-06-14 9:59 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-14 9:54 [bug#27355] [PATCH 0/7] Add sigrok Theodoros Foradis
2017-06-14 9:58 ` [bug#27355] [PATCH 1/7] gnu: Add libzip Theodoros Foradis
2017-06-14 9:58 ` [bug#27355] [PATCH 2/7] gnu: Add libserialport Theodoros Foradis
2017-06-14 9:58 ` [bug#27355] [PATCH 3/7] gnu: Add libsigrokdecode Theodoros Foradis
2017-06-19 20:20 ` Danny Milosavljevic
2017-06-21 20:34 ` Theodoros Foradis
2017-06-23 21:02 ` Theodoros Foradis
2017-06-23 21:05 ` [bug#27355] [PATCH v2 1/7] gnu: Add libzip Theodoros Foradis
2017-06-23 21:05 ` [bug#27355] [PATCH v2 2/7] gnu: Add libserialport Theodoros Foradis
2017-06-23 21:05 ` [bug#27355] [PATCH v2 3/7] gnu: Add libsigrokdecode Theodoros Foradis
2017-06-23 21:05 ` [bug#27355] [PATCH v2 4/7] gnu: Add sigrok-firmware-fx2lafw Theodoros Foradis
2017-06-23 21:05 ` [bug#27355] [PATCH v2 5/7] gnu: Add libsigrok Theodoros Foradis
2017-06-23 21:05 ` [bug#27355] [PATCH v2 6/7] gnu: Add sigrok-cli Theodoros Foradis
2017-06-23 21:05 ` [bug#27355] [PATCH v2 7/7] gnu: Add pulseview Theodoros Foradis
2017-06-26 10:09 ` [bug#27355] [PATCH 3/7] gnu: Add libsigrokdecode Hartmut Goebel
2017-06-26 16:50 ` Theodoros Foradis
2017-06-14 9:58 ` [bug#27355] [PATCH 4/7] gnu: Add sigrok-firmware-fx2lafw Theodoros Foradis
2017-06-14 9:58 ` Theodoros Foradis [this message]
2017-06-19 20:35 ` [bug#27355] [PATCH 5/7] gnu: Add libsigrok Danny Milosavljevic
2017-06-21 23:53 ` Theodoros Foradis
2017-06-14 9:58 ` [bug#27355] [PATCH 6/7] gnu: Add sigrok-cli Theodoros Foradis
2017-06-14 9:58 ` [bug#27355] [PATCH 7/7] gnu: Add pulseview Theodoros Foradis
2017-06-19 20:38 ` Danny Milosavljevic
2017-06-21 23:31 ` Theodoros Foradis
2017-06-24 6:06 ` Danny Milosavljevic
2017-06-15 12:33 ` [bug#27355] [PATCH 1/7] gnu: Add libzip Danny Milosavljevic
2017-06-16 17:42 ` Theodoros Foradis
2017-06-24 6:31 ` bug#27355: [PATCH 0/7] Add sigrok Danny Milosavljevic
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170614095813.1926-5-theodoros.for@openmailbox.org \
--to=theodoros.for@openmailbox.org \
--cc=27355@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.