From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Bavier Subject: Re: [PATCH 3/5] gnu: arduino: Add arduino-hardware Date: Tue, 16 Aug 2016 17:53:09 -0500 Message-ID: <20160816175309.5ceb0a6f@openmailbox.org> References: <20160816183632.30820-1-dannym@scratchpost.org> <20160816183632.30820-4-dannym@scratchpost.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45509) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bZnEX-00056o-VY for guix-devel@gnu.org; Tue, 16 Aug 2016 18:53:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bZnET-0005P9-RE for guix-devel@gnu.org; Tue, 16 Aug 2016 18:53:21 -0400 Received: from mail2.openmailbox.org ([62.4.1.33]:60062) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bZnET-0005P1-Kq for guix-devel@gnu.org; Tue, 16 Aug 2016 18:53:17 -0400 In-Reply-To: <20160816183632.30820-4-dannym@scratchpost.org> 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: Danny Milosavljevic Cc: guix-devel@gnu.org On Tue, 16 Aug 2016 20:36:30 +0200 Danny Milosavljevic wrote: > * gnu/packages/arduino.scm (arduino-hardware): New variable. > --- > gnu/packages/arduino.scm | 53 ++++++++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 53 insertions(+) > > diff --git a/gnu/packages/arduino.scm b/gnu/packages/arduino.scm > index b8d9aba..ae69c04 100644 > --- a/gnu/packages/arduino.scm > +++ b/gnu/packages/arduino.scm > @@ -38,3 +38,56 @@ > (mkdir-p out-share) > (copy-recursively ,filename out-share-part)))) > > +(define-public arduino-hardware > + (package > + (name "arduino-hardware") > + (version "1.6.10") > + (source (origin > + (method url-fetch) > + (uri (string-append "https://github.com/arduino/Arduino/archive/" version ".tar.gz")) This line is certainly too long. > + (sha256 > + (base32 > + "15gbg64i2ac6d0mlnbla567sn26494cvqwf5q53xzf4b5v2rb0jc")) > + (file-name (string-append name "-" version ".tar.gz")) > + (modules '((guix build utils))) > + (snippet > + '(begin > + ;; Delete bundled jar archives. > + (for-each delete-file (find-files "." "\\.jar$")) > + #t)) > + (patches (search-patches "arduino-hardware-patch-out-__cxa_guard_acquire.patch")))) This file seems to be missing from this patch. > + (build-system gnu-build-system) > + (arguments > + `(#:tests? #f ; no tests exist > + #:phases > + (modify-phases %standard-phases > + (delete 'configure) > + (delete 'build) > + (add-after 'unpack 'prepare-dependencies I'm a bit confused here. This phase operates on inputs, but there are none declared? NVM, I see its use '[PATCH 4/5] gnu: arduino: Add arduino-libraries.' > + (lambda* (#:key inputs outputs #:allow-other-keys) > + ;; this is intended to just prepare arduino inputs where its build system expects them > + (for-each (lambda (input) > + (let* ((key (car input)) Prefer to use (ice-9 match)'s 'match' or 'match-lambda' instead of car, cdr, here. E.g.: (for each (match-lambda ((name (? package? package) . outputs) ...)) inputs) `~Eric