all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#27355] [PATCH 0/7] Add sigrok
@ 2017-06-14  9:54 Theodoros Foradis
  2017-06-14  9:58 ` [bug#27355] [PATCH 1/7] gnu: Add libzip Theodoros Foradis
  2017-06-24  6:31 ` bug#27355: [PATCH 0/7] Add sigrok Danny Milosavljevic
  0 siblings, 2 replies; 28+ messages in thread
From: Theodoros Foradis @ 2017-06-14  9:54 UTC (permalink / raw)
  To: 27355

Hello,

This patch series includes all needed packages to run sigrok, a signal
analysis software suite.

I did introduce a new file, electronics.scm, which may not be a good
idea, I could refactor the patches to apply to an existing one.

Also, the package libsigrok, includes a file with udev rules. I have our
package change the udev group from plugdev to dialout. Is that correct?
Or should it be some other group it changes to?


* Theodoros Foradis(7):
 gnu: Add pulseview.
 gnu: Add sigrok-cli.
 gnu: Add libsigrok.
 gnu: Add sigrok-firmware-fx2lafw.
 gnu: Add libsigrokdecode.
 gnu: Add libserialport.
 gnu: Add libzip.
 gnu/local.mk                 |   1 +
 gnu/packages/electronics.scm | 227 ++++++++++++++++++++++++++++++++++++++
 gnu/packages/zip.scm         |  32 ++++++++++++++
 3 files changed, 260 insertions(+)
 create mode 100644 gnu/packages/electronics.scm
-- 
Theodoros Foradis

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [bug#27355] [PATCH 1/7] gnu: Add libzip.
  2017-06-14  9:54 [bug#27355] [PATCH 0/7] Add sigrok Theodoros Foradis
@ 2017-06-14  9:58 ` Theodoros Foradis
  2017-06-14  9:58   ` [bug#27355] [PATCH 2/7] gnu: Add libserialport Theodoros Foradis
                     ` (6 more replies)
  2017-06-24  6:31 ` bug#27355: [PATCH 0/7] Add sigrok Danny Milosavljevic
  1 sibling, 7 replies; 28+ messages in thread
From: Theodoros Foradis @ 2017-06-14  9:58 UTC (permalink / raw)
  To: 27355

* gnu/packages/zip.scm (libzip): New variable.
---
 gnu/packages/zip.scm | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/gnu/packages/zip.scm b/gnu/packages/zip.scm
index 8feb4fea2..4f0e7ff32 100644
--- a/gnu/packages/zip.scm
+++ b/gnu/packages/zip.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
+;;; Copyright © 2017 Theodoros Foradis <theodoros.for@openmailbox.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -175,3 +176,34 @@ recreates the stored directory structure by default.")
 manipulate, read, and write Zip archive files.")
     (home-page "http://search.cpan.org/~adamk/Archive-Zip-1.30/")
     (license license:perl-license)))
+
+(define-public libzip
+  (package
+    (name "libzip")
+    (version "1.2.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://nih.at/libzip/libzip-"
+                    version ".tar.gz"))
+              (sha256
+               (base32
+                "17vxj2ffsxwh8lkc6801ppmwj15jp8q58rin76znxfbx88789ybc"))))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'patch-perl
+           (lambda _
+             (substitute* "regress/runtest.in"
+               (("/usr/bin/env perl") (which "perl"))))))))
+    (inputs
+     `(("perl" ,perl)
+       ("zlib" ,zlib)))
+    (build-system gnu-build-system)
+    (home-page "https://nih.at/libzip/index.html")
+    (synopsis "C library for reading, creating, and modifying zip archives")
+    (description "Libzip is a C library for reading, creating, and modifying zip
+archives.  Files can be added from data buffers, files, or compressed data copied
+directly from other zip archives.  Changes made without closing the archive can be
+reverted.")
+    (license license:bsd-3)))
-- 
2.13.1

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [bug#27355] [PATCH 2/7] gnu: Add libserialport.
  2017-06-14  9:58 ` [bug#27355] [PATCH 1/7] gnu: Add libzip Theodoros Foradis
@ 2017-06-14  9:58   ` Theodoros Foradis
  2017-06-14  9:58   ` [bug#27355] [PATCH 3/7] gnu: Add libsigrokdecode Theodoros Foradis
                     ` (5 subsequent siblings)
  6 siblings, 0 replies; 28+ messages in thread
From: Theodoros Foradis @ 2017-06-14  9:58 UTC (permalink / raw)
  To: 27355

* gnu/packages/electronics.scm (libserialport): New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
---
 gnu/local.mk                 |  1 +
 gnu/packages/electronics.scm | 44 ++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 45 insertions(+)
 create mode 100644 gnu/packages/electronics.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index f761ad21e..a64d581cb 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -126,6 +126,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/ebook.scm			\
   %D%/packages/ed.scm				\
   %D%/packages/education.scm			\
+  %D%/packages/electronics.scm			\
   %D%/packages/elf.scm				\
   %D%/packages/elixir.scm			\
   %D%/packages/embedded.scm			\
diff --git a/gnu/packages/electronics.scm b/gnu/packages/electronics.scm
new file mode 100644
index 000000000..53c7316df
--- /dev/null
+++ b/gnu/packages/electronics.scm
@@ -0,0 +1,44 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2017 Theodoros Foradis <theodoros.for@openmailbox.org>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages electronics)
+ #:use-module (guix utils)
+ #:use-module (guix packages)
+ #:use-module (guix download)
+ #:use-module ((guix licenses) #:prefix license:)
+ #:use-module (guix build-system gnu)
+ #:use-module (gnu packages))
+
+(define-public libserialport
+  (package
+    (name "libserialport")
+    (version "0.1.1")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "http://sigrok.org/download/source/libserialport/libserialport-"
+                    version ".tar.gz"))
+              (sha256
+               (base32
+                "17ajlwgvyyrap8z7f16zcs59pksvncwbmd3mzf98wj7zqgczjaja"))))
+    (build-system gnu-build-system)
+    (home-page "http://sigrok.org/wiki/Libserialport")
+    (synopsis "Library for using serial ports")
+    (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+)))
-- 
2.13.1

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [bug#27355] [PATCH 3/7] gnu: Add libsigrokdecode.
  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   ` Theodoros Foradis
  2017-06-19 20:20     ` Danny Milosavljevic
  2017-06-14  9:58   ` [bug#27355] [PATCH 4/7] gnu: Add sigrok-firmware-fx2lafw Theodoros Foradis
                     ` (4 subsequent siblings)
  6 siblings, 1 reply; 28+ messages in thread
From: Theodoros Foradis @ 2017-06-14  9:58 UTC (permalink / raw)
  To: 27355

* 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

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [bug#27355] [PATCH 4/7] gnu: Add sigrok-firmware-fx2lafw.
  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-14  9:58   ` Theodoros Foradis
  2017-06-14  9:58   ` [bug#27355] [PATCH 5/7] gnu: Add libsigrok Theodoros Foradis
                     ` (3 subsequent siblings)
  6 siblings, 0 replies; 28+ messages in thread
From: Theodoros Foradis @ 2017-06-14  9:58 UTC (permalink / raw)
  To: 27355

* gnu/packages/electronics.scm (sigrok-firmware-fx2lafw): New variable.
---
 gnu/packages/electronics.scm | 24 +++++++++++++++++++++++-
 1 file changed, 23 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/electronics.scm b/gnu/packages/electronics.scm
index 90b025680..d1edb008d 100644
--- a/gnu/packages/electronics.scm
+++ b/gnu/packages/electronics.scm
@@ -26,7 +26,8 @@
  #:use-module (gnu packages check)
  #:use-module (gnu packages glib)
  #:use-module (gnu packages pkg-config)
- #:use-module (gnu packages python))
+ #:use-module (gnu packages python)
+ #:use-module (gnu packages sdcc))
 
 (define-public libserialport
   (package
@@ -72,3 +73,24 @@ to take care of the OS-specific details when writing software that uses serial p
     (description "Libsigrokdecode is a shared library written in C, which provides
 (streaming) protocol decoding functionality.")
     (license license:gpl3+)))
+
+(define-public sigrok-firmware-fx2lafw
+  (package
+    (name "sigrok-firmware-fx2lafw")
+    (version "0.1.5")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "http://sigrok.org/download/source/sigrok-firmware-fx2lafw/"
+                    "sigrok-firmware-fx2lafw-" version ".tar.gz"))
+              (sha256
+               (base32
+                "0bbdgy4rpc00jl0l0744m2ibjlqi26bhrkjr7vplivdsjdmhjx6a"))))
+    (native-inputs
+     `(("sdcc" ,sdcc)))
+    (build-system gnu-build-system)
+    (home-page "http://www.sigrok.org/wiki/Fx2lafw")
+    (synopsis "Firmware for Cypress FX2 chips")
+    (description "Fx2lafw is free firmware for Cypress FX2 chips which makes them usable
+as simple logic analyzer and/or oscilloscope hardware.")
+    (license license:gpl2+)))
-- 
2.13.1

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [bug#27355] [PATCH 5/7] gnu: Add libsigrok.
  2017-06-14  9:58 ` [bug#27355] [PATCH 1/7] gnu: Add libzip Theodoros Foradis
                     ` (2 preceding siblings ...)
  2017-06-14  9:58   ` [bug#27355] [PATCH 4/7] gnu: Add sigrok-firmware-fx2lafw Theodoros Foradis
@ 2017-06-14  9:58   ` Theodoros Foradis
  2017-06-19 20:35     ` Danny Milosavljevic
  2017-06-14  9:58   ` [bug#27355] [PATCH 6/7] gnu: Add sigrok-cli Theodoros Foradis
                     ` (2 subsequent siblings)
  6 siblings, 1 reply; 28+ messages in thread
From: Theodoros Foradis @ 2017-06-14  9:58 UTC (permalink / raw)
  To: 27355

* 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

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [bug#27355] [PATCH 6/7] gnu: Add sigrok-cli.
  2017-06-14  9:58 ` [bug#27355] [PATCH 1/7] gnu: Add libzip Theodoros Foradis
                     ` (3 preceding siblings ...)
  2017-06-14  9:58   ` [bug#27355] [PATCH 5/7] gnu: Add libsigrok Theodoros Foradis
@ 2017-06-14  9:58   ` Theodoros Foradis
  2017-06-14  9:58   ` [bug#27355] [PATCH 7/7] gnu: Add pulseview Theodoros Foradis
  2017-06-15 12:33   ` [bug#27355] [PATCH 1/7] gnu: Add libzip Danny Milosavljevic
  6 siblings, 0 replies; 28+ messages in thread
From: Theodoros Foradis @ 2017-06-14  9:58 UTC (permalink / raw)
  To: 27355

* gnu/packages/electronics.scm (sigrok-cli): New variable.
---
 gnu/packages/electronics.scm | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/gnu/packages/electronics.scm b/gnu/packages/electronics.scm
index fce31fa28..7353ac36a 100644
--- a/gnu/packages/electronics.scm
+++ b/gnu/packages/electronics.scm
@@ -168,3 +168,27 @@ analyzers")
 access drivers for logic analyzers and other supported devices, as well as input/output file
 format support.")
     (license license:gpl3+)))
+
+(define-public sigrok-cli
+  (package
+    (name "sigrok-cli")
+    (version "0.7.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "http://sigrok.org/download/source/sigrok-cli/sigrok-cli-"
+                    version ".tar.gz"))
+              (sha256
+               (base32
+                "072ylscp0ppgii1k5j07hhv7dfmni4vyhxnsvxmgqgfyq9ldjsan"))))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (inputs
+     `(("glib" ,glib)
+       ("libsigrok" ,libsigrok)
+       ("libsigrokdecode" ,libsigrokdecode)))
+    (build-system gnu-build-system)
+    (home-page "http://sigrok.org/wiki/Sigrok-cli")
+    (synopsis "Command-line frontend for sigrok")
+    (description "Sigrok-cli is a command-line frontend for sigrok.")
+    (license license:gpl3+)))
-- 
2.13.1

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [bug#27355] [PATCH 7/7] gnu: Add pulseview.
  2017-06-14  9:58 ` [bug#27355] [PATCH 1/7] gnu: Add libzip Theodoros Foradis
                     ` (4 preceding siblings ...)
  2017-06-14  9:58   ` [bug#27355] [PATCH 6/7] gnu: Add sigrok-cli Theodoros Foradis
@ 2017-06-14  9:58   ` Theodoros Foradis
  2017-06-19 20:38     ` Danny Milosavljevic
  2017-06-15 12:33   ` [bug#27355] [PATCH 1/7] gnu: Add libzip Danny Milosavljevic
  6 siblings, 1 reply; 28+ messages in thread
From: Theodoros Foradis @ 2017-06-14  9:58 UTC (permalink / raw)
  To: 27355

* gnu/packages/electronics.scm (pulseview): New variable.
---
 gnu/packages/electronics.scm | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/gnu/packages/electronics.scm b/gnu/packages/electronics.scm
index 7353ac36a..33ddaa8b8 100644
--- a/gnu/packages/electronics.scm
+++ b/gnu/packages/electronics.scm
@@ -21,8 +21,10 @@
  #:use-module (guix packages)
  #:use-module (guix download)
  #:use-module ((guix licenses) #:prefix license:)
+ #:use-module (guix build-system cmake)
  #:use-module (guix build-system gnu)
  #:use-module (gnu packages)
+   #:use-module (gnu packages boost)
  #:use-module (gnu packages check)
  #:use-module (gnu packages compression)
  #:use-module (gnu packages documentation)
@@ -31,6 +33,7 @@
  #:use-module (gnu packages libusb)
  #:use-module (gnu packages pkg-config)
  #:use-module (gnu packages python)
+ #:use-module (gnu packages qt)
  #:use-module (gnu packages sdcc)
  #:use-module (gnu packages zip))
 
@@ -192,3 +195,33 @@ format support.")
     (synopsis "Command-line frontend for sigrok")
     (description "Sigrok-cli is a command-line frontend for sigrok.")
     (license license:gpl3+)))
+
+(define-public pulseview
+  (package
+    (name "pulseview")
+    (version "0.4.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "http://sigrok.org/download/source/pulseview/pulseview-"
+                    version ".tar.gz"))
+              (sha256
+               (base32
+                "1f8f2342d5yam98mmcb8f9g2vslcwv486bmi4x45pxn68l82ky3q"))))
+    (arguments
+     `(#:configure-flags '("-DCMAKE_CXX_FLAGS=-fext-numeric-literals")))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (inputs
+     `(("boost" ,boost)
+       ("glib" ,glib)
+       ("glibmm" ,glibmm)
+       ("qt" ,qt)
+       ("libsigrok" ,libsigrok)
+       ("libsigrokdecode" ,libsigrokdecode)))
+    (build-system cmake-build-system)
+    (home-page "http://www.sigrok.org/wiki/PulseView")
+    (synopsis "Qt based logic analyzer, oscilloscope and MSO GUI for sigrok")
+    (description "PulseView is a Qt based logic analyzer, oscilloscope and MSO GUI
+for sigrok.")
+    (license license:gpl3+)))
-- 
2.13.1

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [bug#27355] [PATCH 1/7] gnu: Add libzip.
  2017-06-14  9:58 ` [bug#27355] [PATCH 1/7] gnu: Add libzip Theodoros Foradis
                     ` (5 preceding siblings ...)
  2017-06-14  9:58   ` [bug#27355] [PATCH 7/7] gnu: Add pulseview Theodoros Foradis
@ 2017-06-15 12:33   ` Danny Milosavljevic
  2017-06-16 17:42     ` Theodoros Foradis
  6 siblings, 1 reply; 28+ messages in thread
From: Danny Milosavljevic @ 2017-06-15 12:33 UTC (permalink / raw)
  To: Theodoros Foradis; +Cc: 27355

> +     `(#:phases
> +       (modify-phases %standard-phases
> +         (add-before 'configure 'patch-perl
> +           (lambda _
> +             (substitute* "regress/runtest.in"
> +               (("/usr/bin/env perl") (which "perl"))))))))
> +    (inputs
> +     `(("perl" ,perl)

Hmm.  Sounds like perl is used for regression tests.  Is it used in the derivation?

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [bug#27355] [PATCH 1/7] gnu: Add libzip.
  2017-06-15 12:33   ` [bug#27355] [PATCH 1/7] gnu: Add libzip Danny Milosavljevic
@ 2017-06-16 17:42     ` Theodoros Foradis
  0 siblings, 0 replies; 28+ messages in thread
From: Theodoros Foradis @ 2017-06-16 17:42 UTC (permalink / raw)
  To: 27355


Danny Milosavljevic writes:

>> +     `(#:phases
>> +       (modify-phases %standard-phases
>> +         (add-before 'configure 'patch-perl
>> +           (lambda _
>> +             (substitute* "regress/runtest.in"
>> +               (("/usr/bin/env perl") (which "perl"))))))))
>> +    (inputs
>> +     `(("perl" ,perl)
>
> Hmm.  Sounds like perl is used for regression tests.  Is it used in the derivation?

Right, thanks for catching that. I'll move perl to native-inputs.

-- 
Theodoros Foradis

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [bug#27355] [PATCH 3/7] gnu: Add libsigrokdecode.
  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
                         ` (2 more replies)
  0 siblings, 3 replies; 28+ messages in thread
From: Danny Milosavljevic @ 2017-06-19 20:20 UTC (permalink / raw)
  To: Theodoros Foradis; +Cc: Hartmut Goebel, 27355

Hi Theodoros,
Hi Hartmut,

the README lists some more dependencies:

 - doxygen (optional, only needed for the C API docs)
 - graphviz (optional, only needed for the C API docs)

Do you think it makes sense to build the API docs?

Also, reading srd.c it seems that this library embeds Python.  Is it still supposed to be a propagated-input then?  It doesn't need the executable at runtime or anything.  Users probably do need the Python standard library, so I guess it's OK...  Hartmut, what do you think?

Extra Python scripts for libsigrokdecode can be installed by the user into ${XDG_DATA_HOME-.local/share}/libsigrokdecode/decoders which is nice.

Additionally, there's an environment variable SIGROKDECODE_DIR too.

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [bug#27355] [PATCH 5/7] gnu: Add libsigrok.
  2017-06-14  9:58   ` [bug#27355] [PATCH 5/7] gnu: Add libsigrok Theodoros Foradis
@ 2017-06-19 20:35     ` Danny Milosavljevic
  2017-06-21 23:53       ` Theodoros Foradis
  0 siblings, 1 reply; 28+ messages in thread
From: Danny Milosavljevic @ 2017-06-19 20:35 UTC (permalink / raw)
  To: Theodoros Foradis; +Cc: 27355

Hi,

On Wed, 14 Jun 2017 12:58:11 +0300
Theodoros Foradis <theodoros.for@openmailbox.org> wrote:

> +     `(#:tests? #f ; tests need usb access

All of them?

> +         (add-after 'install 'install-udev-rules
...
> +         (add-after 'install-eudev-rules 'install-fw
                                ^ e?

> +           (lambda* (#:key inputs outputs #:allow-other-keys)
> +             (let* ((fx2lafw (assoc-ref inputs "sigrok-firmware-fx2lafw"))
> +                    (out (assoc-ref outputs "out"))
> +                    (dir "/share/sigrok-firmware/")

Maybe "dir-suffix" ?  Not that important...

> +    (description "Libsigrok is a shared library written in C, which provides the basic hardware

                                                               ^ comma looks weird here

Also maybe @code{libsigrok} ?

Otherwise LGTM!

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [bug#27355] [PATCH 7/7] gnu: Add pulseview.
  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
  0 siblings, 1 reply; 28+ messages in thread
From: Danny Milosavljevic @ 2017-06-19 20:38 UTC (permalink / raw)
  To: Theodoros Foradis; +Cc: 27355

> +       ("qt" ,qt)

Does it work with the newer modular Qt (qtbase, qtserialport, qttools) ?

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [bug#27355] [PATCH 3/7] gnu: Add libsigrokdecode.
  2017-06-19 20:20     ` Danny Milosavljevic
@ 2017-06-21 20:34       ` Theodoros Foradis
  2017-06-23 21:02       ` Theodoros Foradis
  2017-06-26 10:09       ` [bug#27355] [PATCH 3/7] gnu: Add libsigrokdecode Hartmut Goebel
  2 siblings, 0 replies; 28+ messages in thread
From: Theodoros Foradis @ 2017-06-21 20:34 UTC (permalink / raw)
  To: 27355

Hello,

> the README lists some more dependencies:
>
>  - doxygen (optional, only needed for the C API docs)
>  - graphviz (optional, only needed for the C API docs)
>
> Do you think it makes sense to build the API docs?
>

I recall adding those two as native-inputs but the API docs not
building. I will try again though, and see if I can get it to work. It
makes sense to me to have the docs.

> Also, reading srd.c it seems that this library embeds Python.  Is it still supposed to be a propagated-input then?  It doesn't need the executable at runtime or anything.  Users probably do need the Python standard library, so I guess it's OK...  Hartmut, what do you think?
>

libsigrokdecode.pc, that is the pkg-config file  lists python in
Requires.private. If python is not propagated, libsigrok which depends
on libsigrokdecode cannot be built.

Maybe there is another way for this to work? I saw that done in another
package.

> Extra Python scripts for libsigrokdecode can be installed by the user into ${XDG_DATA_HOME-.local/share}/libsigrokdecode/decoders which is nice.
>
> Additionally, there's an environment variable SIGROKDECODE_DIR too.

Does the package have to set any native-search-paths for this, to let
the users know of the environment variable?

-- 
Theodoros Foradis

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [bug#27355] [PATCH 7/7] gnu: Add pulseview.
  2017-06-19 20:38     ` Danny Milosavljevic
@ 2017-06-21 23:31       ` Theodoros Foradis
  2017-06-24  6:06         ` Danny Milosavljevic
  0 siblings, 1 reply; 28+ messages in thread
From: Theodoros Foradis @ 2017-06-21 23:31 UTC (permalink / raw)
  To: 27355


Danny Milosavljevic writes:

>> +       ("qt" ,qt)
>
> Does it work with the newer modular Qt (qtbase, qtserialport, qttools) ?

It does build with qtbase and qtsvg, but icons are missing from the
ui. I didn't manage to find which package provides them, having tried a
few.

Any ideas what that may be? Or should we keep qt as a dependency?

-- 
Theodoros Foradis

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [bug#27355] [PATCH 5/7] gnu: Add libsigrok.
  2017-06-19 20:35     ` Danny Milosavljevic
@ 2017-06-21 23:53       ` Theodoros Foradis
  0 siblings, 0 replies; 28+ messages in thread
From: Theodoros Foradis @ 2017-06-21 23:53 UTC (permalink / raw)
  To: 27355

Hi,

>> +     `(#:tests? #f ; tests need usb access
>
> All of them?
>

It reports 1 fail out of 1 test, giving out usb permission errors. The
only other test-related target, check-TESTS fails likewise.

>> +         (add-after 'install 'install-udev-rules
> ...
>> +         (add-after 'install-eudev-rules 'install-fw
>                                 ^ e?
>

fixed

>> +           (lambda* (#:key inputs outputs #:allow-other-keys)
>> +             (let* ((fx2lafw (assoc-ref inputs "sigrok-firmware-fx2lafw"))
>> +                    (out (assoc-ref outputs "out"))
>> +                    (dir "/share/sigrok-firmware/")
>
> Maybe "dir-suffix" ?  Not that important...
>

Changed that.

>> +    (description "Libsigrok is a shared library written in C, which provides the basic hardware
>
>                                                                ^ comma looks weird here
>
> Also maybe @code{libsigrok} ?

Changed both. I will send an updated patch series, with all the changes,
as soon as the qt issue with pulseview is resolved.

Regards,
-- 
Theodoros Foradis

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [bug#27355] [PATCH 3/7] gnu: Add libsigrokdecode.
  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-26 10:09       ` [bug#27355] [PATCH 3/7] gnu: Add libsigrokdecode Hartmut Goebel
  2 siblings, 1 reply; 28+ messages in thread
From: Theodoros Foradis @ 2017-06-23 21:02 UTC (permalink / raw)
  To: 27355

Hello,

> the README lists some more dependencies:
>
>  - doxygen (optional, only needed for the C API docs)
>  - graphviz (optional, only needed for the C API docs)
>
> Do you think it makes sense to build the API docs?

I am replying to this with un updated patch series, rebased on current
master, because the old wouldn't apply due to migration of zip.scm to
compression.scm.

I have fixed the suggested issues, and added the C API docs for libsigrok
and libsigrokdecode. I did not manage to use the modular qt packages
instead of qt because icons are missing, suggestions are welcome.

Theodoros Foradis(7):
 gnu: Add pulseview.
 gnu: Add sigrok-cli.
 gnu: Add libsigrok.
 gnu: Add sigrok-firmware-fx2lafw.
 gnu: Add libsigrokdecode.
 gnu: Add libserialport.
 gnu: Add libzip.

 gnu/local.mk                 |   1 +
 gnu/packages/compression.scm |  33 +++++++++++++++++++++++++++++++
 gnu/packages/electronics.scm | 253 +++++++++++++++++++++++++++++++++++++
 3 files changed, 287 insertions(+)
 create mode 100644 gnu/packages/electronics.scm
-- 
Theodoros Foradis

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [bug#27355] [PATCH v2 1/7] gnu: Add libzip.
  2017-06-23 21:02       ` Theodoros Foradis
@ 2017-06-23 21:05         ` Theodoros Foradis
  2017-06-23 21:05           ` [bug#27355] [PATCH v2 2/7] gnu: Add libserialport Theodoros Foradis
                             ` (5 more replies)
  0 siblings, 6 replies; 28+ messages in thread
From: Theodoros Foradis @ 2017-06-23 21:05 UTC (permalink / raw)
  To: 27355

* gnu/packages/compression.scm (libzip): New variable.
---
 gnu/packages/compression.scm | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm
index 2667ebb97..2ca00a7a4 100644
--- a/gnu/packages/compression.scm
+++ b/gnu/packages/compression.scm
@@ -16,6 +16,7 @@
 ;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com>
 ;;; Copyright © 2017 ng0 <contact.ng0@cryptolab.net>
 ;;; Copyright © 2017 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
+;;; Copyright © 2017 Theodoros Foradis <theodoros.for@openmailbox.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1491,3 +1492,35 @@ recreates the stored directory structure by default.")
 manipulate, read, and write Zip archive files.")
     (home-page "http://search.cpan.org/~adamk/Archive-Zip-1.30/")
     (license license:perl-license)))
+
+(define-public libzip
+  (package
+    (name "libzip")
+    (version "1.2.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://nih.at/libzip/libzip-"
+                    version ".tar.gz"))
+              (sha256
+               (base32
+                "17vxj2ffsxwh8lkc6801ppmwj15jp8q58rin76znxfbx88789ybc"))))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'patch-perl
+           (lambda _
+             (substitute* "regress/runtest.in"
+               (("/usr/bin/env perl") (which "perl"))))))))
+    (native-inputs
+     `(("perl" ,perl)))
+    (inputs
+     `(("zlib" ,zlib)))
+    (build-system gnu-build-system)
+    (home-page "https://nih.at/libzip/index.html")
+    (synopsis "C library for reading, creating, and modifying zip archives")
+    (description "Libzip is a C library for reading, creating, and modifying zip
+archives.  Files can be added from data buffers, files, or compressed data copied
+directly from other zip archives.  Changes made without closing the archive can be
+reverted.")
+    (license license:bsd-3)))
-- 
2.13.1

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [bug#27355] [PATCH v2 2/7] gnu: Add libserialport.
  2017-06-23 21:05         ` [bug#27355] [PATCH v2 1/7] gnu: Add libzip Theodoros Foradis
@ 2017-06-23 21:05           ` Theodoros Foradis
  2017-06-23 21:05           ` [bug#27355] [PATCH v2 3/7] gnu: Add libsigrokdecode Theodoros Foradis
                             ` (4 subsequent siblings)
  5 siblings, 0 replies; 28+ messages in thread
From: Theodoros Foradis @ 2017-06-23 21:05 UTC (permalink / raw)
  To: 27355

* gnu/packages/electronics.scm (libserialport): New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
---
 gnu/local.mk                 |  1 +
 gnu/packages/electronics.scm | 44 ++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 45 insertions(+)
 create mode 100644 gnu/packages/electronics.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index 88ea8daf4..a1c6249a0 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -126,6 +126,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/ebook.scm			\
   %D%/packages/ed.scm				\
   %D%/packages/education.scm			\
+  %D%/packages/electronics.scm			\
   %D%/packages/elf.scm				\
   %D%/packages/elixir.scm			\
   %D%/packages/embedded.scm			\
diff --git a/gnu/packages/electronics.scm b/gnu/packages/electronics.scm
new file mode 100644
index 000000000..4abe9eea6
--- /dev/null
+++ b/gnu/packages/electronics.scm
@@ -0,0 +1,44 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2017 Theodoros Foradis <theodoros.for@openmailbox.org>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages electronics)
+  #:use-module (guix utils)
+  #:use-module (guix packages)
+  #:use-module (guix download)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix build-system gnu)
+  #:use-module (gnu packages))
+
+(define-public libserialport
+  (package
+    (name "libserialport")
+    (version "0.1.1")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "http://sigrok.org/download/source/libserialport/libserialport-"
+                    version ".tar.gz"))
+              (sha256
+               (base32
+                "17ajlwgvyyrap8z7f16zcs59pksvncwbmd3mzf98wj7zqgczjaja"))))
+    (build-system gnu-build-system)
+    (home-page "http://sigrok.org/wiki/Libserialport")
+    (synopsis "Library for using serial ports")
+    (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+)))
-- 
2.13.1

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [bug#27355] [PATCH v2 3/7] gnu: Add libsigrokdecode.
  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           ` Theodoros Foradis
  2017-06-23 21:05           ` [bug#27355] [PATCH v2 4/7] gnu: Add sigrok-firmware-fx2lafw Theodoros Foradis
                             ` (3 subsequent siblings)
  5 siblings, 0 replies; 28+ messages in thread
From: Theodoros Foradis @ 2017-06-23 21:05 UTC (permalink / raw)
  To: 27355

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

diff --git a/gnu/packages/electronics.scm b/gnu/packages/electronics.scm
index 4abe9eea6..a62b06dc5 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+)))
-- 
2.13.1

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [bug#27355] [PATCH v2 4/7] gnu: Add sigrok-firmware-fx2lafw.
  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           ` Theodoros Foradis
  2017-06-23 21:05           ` [bug#27355] [PATCH v2 5/7] gnu: Add libsigrok Theodoros Foradis
                             ` (2 subsequent siblings)
  5 siblings, 0 replies; 28+ messages in thread
From: Theodoros Foradis @ 2017-06-23 21:05 UTC (permalink / raw)
  To: 27355

* gnu/packages/electronics.scm (sigrok-firmware-fx2lafw): New variable.
---
 gnu/packages/electronics.scm | 25 +++++++++++++++++++++++--
 1 file changed, 23 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/electronics.scm b/gnu/packages/electronics.scm
index a62b06dc5..324864946 100644
--- a/gnu/packages/electronics.scm
+++ b/gnu/packages/electronics.scm
@@ -28,8 +28,8 @@
   #:use-module (gnu packages glib)
   #:use-module (gnu packages graphviz)
   #:use-module (gnu packages pkg-config)
-  #:use-module (gnu packages python))
-
+  #:use-module (gnu packages python)
+  #:use-module (gnu packages sdcc))
 
 (define-public libserialport
   (package
@@ -90,3 +90,24 @@ to take care of the OS-specific details when writing software that uses serial p
     (description "Libsigrokdecode is a shared library written in C, which provides
 (streaming) protocol decoding functionality.")
     (license license:gpl3+)))
+
+(define-public sigrok-firmware-fx2lafw
+  (package
+    (name "sigrok-firmware-fx2lafw")
+    (version "0.1.5")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "http://sigrok.org/download/source/sigrok-firmware-fx2lafw/"
+                    "sigrok-firmware-fx2lafw-" version ".tar.gz"))
+              (sha256
+               (base32
+                "0bbdgy4rpc00jl0l0744m2ibjlqi26bhrkjr7vplivdsjdmhjx6a"))))
+    (native-inputs
+     `(("sdcc" ,sdcc)))
+    (build-system gnu-build-system)
+    (home-page "http://www.sigrok.org/wiki/Fx2lafw")
+    (synopsis "Firmware for Cypress FX2 chips")
+    (description "Fx2lafw is free firmware for Cypress FX2 chips which makes them usable
+as simple logic analyzer and/or oscilloscope hardware.")
+    (license license:gpl2+)))
-- 
2.13.1

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [bug#27355] [PATCH v2 5/7] gnu: Add libsigrok.
  2017-06-23 21:05         ` [bug#27355] [PATCH v2 1/7] gnu: Add libzip Theodoros Foradis
                             ` (2 preceding siblings ...)
  2017-06-23 21:05           ` [bug#27355] [PATCH v2 4/7] gnu: Add sigrok-firmware-fx2lafw Theodoros Foradis
@ 2017-06-23 21:05           ` 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
  5 siblings, 0 replies; 28+ messages in thread
From: Theodoros Foradis @ 2017-06-23 21:05 UTC (permalink / raw)
  To: 27355

* gnu/packages/electronics.scm (libsigrok): New variable.
---
 gnu/packages/electronics.scm | 83 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 83 insertions(+)

diff --git a/gnu/packages/electronics.scm b/gnu/packages/electronics.scm
index 324864946..5d05f10da 100644
--- a/gnu/packages/electronics.scm
+++ b/gnu/packages/electronics.scm
@@ -24,9 +24,12 @@
   #: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 graphviz)
+  #: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))
@@ -111,3 +114,83 @@ 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"))))
+    (outputs '("out" "doc"))
+    (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 '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/libsigrok"))
+             #t))
+         (add-after 'install-doc '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-udev-rules 'install-fw
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let* ((fx2lafw (assoc-ref inputs "sigrok-firmware-fx2lafw"))
+                    (out (assoc-ref outputs "out"))
+                    (dir-suffix "/share/sigrok-firmware/")
+                    (input-dir (string-append fx2lafw dir-suffix))
+                    (output-dir (string-append out dir-suffix)))
+               (mkdir-p output-dir)
+               (for-each
+                (lambda (file)
+                  (install-file file output-dir))
+                (find-files input-dir ".")))
+             #t)))))
+    (native-inputs
+     `(("check" ,check)
+       ("doxygen" ,doxygen)
+       ("graphviz" ,graphviz)
+       ("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 "@code{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

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [bug#27355] [PATCH v2 6/7] gnu: Add sigrok-cli.
  2017-06-23 21:05         ` [bug#27355] [PATCH v2 1/7] gnu: Add libzip Theodoros Foradis
                             ` (3 preceding siblings ...)
  2017-06-23 21:05           ` [bug#27355] [PATCH v2 5/7] gnu: Add libsigrok Theodoros Foradis
@ 2017-06-23 21:05           ` Theodoros Foradis
  2017-06-23 21:05           ` [bug#27355] [PATCH v2 7/7] gnu: Add pulseview Theodoros Foradis
  5 siblings, 0 replies; 28+ messages in thread
From: Theodoros Foradis @ 2017-06-23 21:05 UTC (permalink / raw)
  To: 27355

* gnu/packages/electronics.scm (sigrok-cli): New variable.
---
 gnu/packages/electronics.scm | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/gnu/packages/electronics.scm b/gnu/packages/electronics.scm
index 5d05f10da..75bb2960d 100644
--- a/gnu/packages/electronics.scm
+++ b/gnu/packages/electronics.scm
@@ -194,3 +194,27 @@ analyzers")
 access drivers for logic analyzers and other supported devices, as well as input/output file
 format support.")
     (license license:gpl3+)))
+
+(define-public sigrok-cli
+  (package
+    (name "sigrok-cli")
+    (version "0.7.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "http://sigrok.org/download/source/sigrok-cli/sigrok-cli-"
+                    version ".tar.gz"))
+              (sha256
+               (base32
+                "072ylscp0ppgii1k5j07hhv7dfmni4vyhxnsvxmgqgfyq9ldjsan"))))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (inputs
+     `(("glib" ,glib)
+       ("libsigrok" ,libsigrok)
+       ("libsigrokdecode" ,libsigrokdecode)))
+    (build-system gnu-build-system)
+    (home-page "http://sigrok.org/wiki/Sigrok-cli")
+    (synopsis "Command-line frontend for sigrok")
+    (description "Sigrok-cli is a command-line frontend for sigrok.")
+    (license license:gpl3+)))
-- 
2.13.1

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [bug#27355] [PATCH v2 7/7] gnu: Add pulseview.
  2017-06-23 21:05         ` [bug#27355] [PATCH v2 1/7] gnu: Add libzip Theodoros Foradis
                             ` (4 preceding siblings ...)
  2017-06-23 21:05           ` [bug#27355] [PATCH v2 6/7] gnu: Add sigrok-cli Theodoros Foradis
@ 2017-06-23 21:05           ` Theodoros Foradis
  5 siblings, 0 replies; 28+ messages in thread
From: Theodoros Foradis @ 2017-06-23 21:05 UTC (permalink / raw)
  To: 27355

* gnu/packages/electronics.scm (pulseview): New variable.
---
 gnu/packages/electronics.scm | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/gnu/packages/electronics.scm b/gnu/packages/electronics.scm
index 75bb2960d..8a9f625dc 100644
--- a/gnu/packages/electronics.scm
+++ b/gnu/packages/electronics.scm
@@ -22,7 +22,9 @@
   #:use-module (guix download)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system cmake)
   #:use-module (gnu packages)
+  #:use-module (gnu packages boost)
   #:use-module (gnu packages check)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages documentation)
@@ -32,6 +34,7 @@
   #:use-module (gnu packages libusb)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages qt)
   #:use-module (gnu packages sdcc))
 
 (define-public libserialport
@@ -218,3 +221,33 @@ format support.")
     (synopsis "Command-line frontend for sigrok")
     (description "Sigrok-cli is a command-line frontend for sigrok.")
     (license license:gpl3+)))
+
+(define-public pulseview
+  (package
+    (name "pulseview")
+    (version "0.4.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "http://sigrok.org/download/source/pulseview/pulseview-"
+                    version ".tar.gz"))
+              (sha256
+               (base32
+                "1f8f2342d5yam98mmcb8f9g2vslcwv486bmi4x45pxn68l82ky3q"))))
+    (arguments
+     `(#:configure-flags '("-DCMAKE_CXX_FLAGS=-fext-numeric-literals")))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (inputs
+     `(("boost" ,boost)
+       ("glib" ,glib)
+       ("glibmm" ,glibmm)
+       ("qt" ,qt)
+       ("libsigrok" ,libsigrok)
+       ("libsigrokdecode" ,libsigrokdecode)))
+    (build-system cmake-build-system)
+    (home-page "http://www.sigrok.org/wiki/PulseView")
+    (synopsis "Qt based logic analyzer, oscilloscope and MSO GUI for sigrok")
+    (description "PulseView is a Qt based logic analyzer, oscilloscope and MSO GUI
+for sigrok.")
+    (license license:gpl3+)))
-- 
2.13.1

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [bug#27355] [PATCH 7/7] gnu: Add pulseview.
  2017-06-21 23:31       ` Theodoros Foradis
@ 2017-06-24  6:06         ` Danny Milosavljevic
  0 siblings, 0 replies; 28+ messages in thread
From: Danny Milosavljevic @ 2017-06-24  6:06 UTC (permalink / raw)
  To: Theodoros Foradis; +Cc: 27355

Hi,

On Thu, 22 Jun 2017 02:31:14 +0300
Theodoros Foradis <theodoros.for@openmailbox.org> wrote:

> It does build with qtbase and qtsvg, but icons are missing from the
> ui. I didn't manage to find which package provides them, having tried a
> few.
> 
> Any ideas what that [package] may be? 

I don't know, sorry.

For the file names of the icons, you can try starting pulseview under strace:

$ strace pulseview 2>&1 |grep -i -E "(png|svg)"

>Or should we keep qt as a dependency?

Yeah, let's use the older Qt for now.

I hope someone else chimes in and we can update it somewhen.

I don't like depending on older versions of things much.  It's just asking for problems which have been fixed in newer versions already.  But in this case apparently it's the other way around...

^ permalink raw reply	[flat|nested] 28+ messages in thread

* bug#27355: [PATCH 0/7] Add sigrok
  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-24  6:31 ` Danny Milosavljevic
  1 sibling, 0 replies; 28+ messages in thread
From: Danny Milosavljevic @ 2017-06-24  6:31 UTC (permalink / raw)
  To: Theodoros Foradis; +Cc: 27355-done

Pushed the sigrok patchset to master as the following commits:

- 6df20b5ae64b747865265410609527c0ac134915 (pulseview)
- 2dbad1dd6e94bcc8ecb6f1a2d11f87845022a6b6 (sigrok-cli)
- 1c12be968251f301f061e2101796a2d8223ad4ec (libsigrok)
- 7a19de9c48670684df1c78cc2d43e7d59374c596 (sigrok-firmware-fx2lafw)
- c07358022a74a4c82de7fef392ece66788f3b35d (libsigrokdecode)
- 03d0cc116001d2bac4204925c9d169ec3a58323f (libserialport)
- 06de4aaf1e71916181c87997b62698a09db35009 (libzip)

Thanks for the patches!

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [bug#27355] [PATCH 3/7] gnu: Add libsigrokdecode.
  2017-06-19 20:20     ` Danny Milosavljevic
  2017-06-21 20:34       ` Theodoros Foradis
  2017-06-23 21:02       ` Theodoros Foradis
@ 2017-06-26 10:09       ` Hartmut Goebel
  2017-06-26 16:50         ` Theodoros Foradis
  2 siblings, 1 reply; 28+ messages in thread
From: Hartmut Goebel @ 2017-06-26 10:09 UTC (permalink / raw)
  To: Danny Milosavljevic, Theodoros Foradis; +Cc: 27355

Hi,
> Also, reading srd.c it seems that this library embeds Python.  Is it still supposed to be a propagated-input then?  It doesn't need the executable at runtime or anything.  Users probably do need the Python standard library, so I guess it's OK...  Hartmut, what do you think?

Sorry for answering late.

I'm confident that python should be a *normal* input – although it
should be tested (and the result documented in guix.texi). I'm short in
time, so I can't test myself now.

From the Documentation [1] I can not tell exactly how libpython behaves
if used embedded. But the code [2] says:

    Step 3 [… search python3 on $PATH]

    Step 4. Search the directories pointed to by the preprocessor variables
    PREFIX and EXEC_PREFIX.  These are supplied by the Makefile but can be
    passed in as options to the configure script.

So the PREFIX guix is setting is honoured (as a last resort).

BTW: I assume glib should be a normal input, too.

[1] https://docs.python.org/3/c-api/init.html
[2] https://github.com/python/cpython/blob/master/Modules/getpath.c#L73

[3] https://github.com/python/cpython/blob/master/Modules/getpath.c#L495
[4] https://github.com/python/cpython/blob/master/Modules/getpath.c#L364

-- 
Regards
Hartmut Goebel

| Hartmut Goebel          | h.goebel@crazy-compilers.com               |
| www.crazy-compilers.com | compilers which you thought are impossible |

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [bug#27355] [PATCH 3/7] gnu: Add libsigrokdecode.
  2017-06-26 10:09       ` [bug#27355] [PATCH 3/7] gnu: Add libsigrokdecode Hartmut Goebel
@ 2017-06-26 16:50         ` Theodoros Foradis
  0 siblings, 0 replies; 28+ messages in thread
From: Theodoros Foradis @ 2017-06-26 16:50 UTC (permalink / raw)
  To: 27355

Hello,

> Hi,
>> Also, reading srd.c it seems that this library embeds Python.  Is it still supposed to be a propagated-input then?  It doesn't need the executable at runtime or anything.  Users probably do need the Python standard library, so I guess it's OK...  Hartmut, what do you think?
>
> Sorry for answering late.
>
> I'm confident that python should be a *normal* input – although it
> should be tested (and the result documented in guix.texi). I'm short in
> time, so I can't test myself now.
>
> From the Documentation [1] I can not tell exactly how libpython behaves
> if used embedded. But the code [2] says:
>
>     Step 3 [… search python3 on $PATH]
>
>     Step 4. Search the directories pointed to by the preprocessor variables
>     PREFIX and EXEC_PREFIX.  These are supplied by the Makefile but can be
>     passed in as options to the configure script.
>
> So the PREFIX guix is setting is honoured (as a last resort).
>
> BTW: I assume glib should be a normal input, too.
>
> [1] https://docs.python.org/3/c-api/init.html
> [2] https://github.com/python/cpython/blob/master/Modules/getpath.c#L73
>
> [3] https://github.com/python/cpython/blob/master/Modules/getpath.c#L495
> [4] https://github.com/python/cpython/blob/master/Modules/getpath.c#L364

I have tested having either python/glibc as *normal* inputs. Cmake,
which is used by pulseview, gives out an error and the build fails at
the configure phase. Maybe I'm missing something?

Regards,
-- 
Theodoros Foradis

^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2017-06-26 17:28 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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   ` [bug#27355] [PATCH 5/7] gnu: Add libsigrok Theodoros Foradis
2017-06-19 20:35     ` 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

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.