From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: [PATCH] Add SimpleDSO. Date: Sun, 01 May 2016 18:22:17 +0200 Message-ID: <87inyxwxxi.fsf@elephly.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54465) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1awu8y-0000E8-3A for guix-devel@gnu.org; Sun, 01 May 2016 12:22:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1awu8l-0007wj-JH for guix-devel@gnu.org; Sun, 01 May 2016 12:22:46 -0400 Received: from sender163-mail.zoho.com ([74.201.84.163]:24649) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1awu8l-0007vG-AF for guix-devel@gnu.org; Sun, 01 May 2016 12:22:39 -0400 List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: "guix-devel@gnu.org" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Hi Guix, this patch adds a tool to display waveforms from my digital storage oscilloscope. The package definition is a bit ugly because upstream doesn’t really have a good build system. It works fine for me and I hope it’s useful for others as well. ~~ Ricardo --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0001-gnu-Add-python2-pyqt-4.patch Content-Transfer-Encoding: 8bit >From 2ad0b4186e08f8e1e81fc8394ffebfd3f75afac8 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Tue, 29 Mar 2016 19:41:25 +0200 Subject: [PATCH 1/2] gnu: Add python2-pyqt-4. * gnu/packages/qt.scm (python2-pyqt-4): New variable. --- gnu/packages/qt.scm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index 7b2be4f..58e267f 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2015 Sou Bunnbu ;;; Copyright © 2015 Ludovic Courtès ;;; Copyright © 2015 Efraim Flashner +;;; Copyright © 2016 Ricardo Wurmus ;;; ;;; This file is part of GNU Guix. ;;; @@ -540,6 +541,15 @@ contain over 620 classes.") %standard-phases))) (license (list gpl2 gpl3)))) ; choice of either license +(define-public python2-pyqt-4 + (package (inherit python-pyqt-4) + (name "python2-pyqt") + (native-inputs + `(("python-sip" ,python2-sip) + ("qt" ,qt-4))) + (inputs + `(("python" ,python-2))))) + (define-public qtkeychain (package (name "qtkeychain") -- 2.7.3 --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0002-gnu-Add-SimpleDSO.patch Content-Transfer-Encoding: 8bit >From c18c67dd1817f3d32608e2841465745294a19ac7 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Tue, 29 Mar 2016 19:43:00 +0200 Subject: [PATCH 2/2] gnu: Add SimpleDSO. * gnu/packages/engineering.scm (simpledso): New variable. --- gnu/packages/engineering.scm | 75 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 74 insertions(+), 1 deletion(-) diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm index c519ca5..fca12d6 100644 --- a/gnu/packages/engineering.scm +++ b/gnu/packages/engineering.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2015 Ricardo Wurmus +;;; Copyright © 2015, 2016 Ricardo Wurmus ;;; Copyright © 2015 Federico Beffa ;;; Copyright © 2016 Efraim Flashner ;;; Copyright © 2016 David Thompson @@ -45,11 +45,13 @@ #:use-module (gnu packages gnome) #:use-module (gnu packages gtk) #:use-module (gnu packages guile) + #:use-module (gnu packages libusb) #:use-module (gnu packages linux) ;FIXME: for pcb #:use-module (gnu packages m4) #:use-module (gnu packages maths) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) + #:use-module (gnu packages python) #:use-module (gnu packages qt) #:use-module (gnu packages tcl) #:use-module (gnu packages texlive) @@ -416,6 +418,77 @@ ready for production.") ;; released under GPLv3+. (license (list license:gpl3+ license:cc-by-sa3.0)))) +(define-public simpledso + (package + (name "simpledso") + (version "0.3") + (source (origin + (method url-fetch/tarbomb) + (file-name (string-append name "-" version ".tar.gz")) + (uri (string-append "mirror://sourceforge/simpledso/simpleDSO_v" + version "_source.tar.gz")) + (sha256 + (base32 + "0rczxwjfq649hra8d3xnvpwarabs2c823zln4kikczyzqjaqkyjg")) + (modules '((guix build utils))) + ;; Remove pre-compiled files. + (snippet + '(for-each delete-file (find-files "." "\\.pyc$"))))) + (build-system gnu-build-system) + (arguments + `(#:tests? #f ; no tests + #:modules ((guix build gnu-build-system) + (guix build utils) + (srfi srfi-26)) + #:phases + (modify-phases %standard-phases + (delete 'configure) + (delete 'build) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (share (string-append out "/share/simpledso")) + (bin (string-append out "/bin")) + (wrapper (string-append bin "/simpleDSO"))) + (mkdir-p share) + (for-each (lambda (file) (install-file file share)) + `("vid_pid.txt" + "utils.py" + "icon.ico" + "simpleDSO.py" + "graphic.py")) + (for-each (lambda (dir) + (let ((target (string-append share "/" dir))) + (mkdir-p target) + (for-each (cut install-file <> target) + (find-files dir ".*")))) + '("ut2XXX" "doc" "UI")) + (mkdir-p bin) + (with-output-to-file wrapper + (lambda () + (display + (string-append + "#!" (which "bash") "\n" + "PYTHONPATH=" share ":" (getenv "PYTHONPATH") "\n" + "export PYTHONPATH\n" + "exec " share "/simpleDSO.py" "\n")))) + (chmod wrapper #o755)) + #t))))) + (inputs + `(("python2-pyqt-4" ,python2-pyqt-4) + ("python2-sip" ,python2-sip) + ("python2-pyusb" ,python2-pyusb) + ("python2" ,python-2) + ("qt" ,qt-4))) + (home-page "https://github.com/dnet/SimpleDSO") + (synopsis "Capture data from digital storage oscilloscope") + (description + "SimpleDSO is a tool to capture screenshots or raw data from UNI-T +digital storage oscilloscopes via USB. The following features are +implemented: take a screenshot from the oscilloscope; generate waveform from +raw data; save data as CSV.") + (license license:gpl2+))) + (define-public gerbv (package (name "gerbv") -- 2.7.3 --=-=-=--