From mboxrd@z Thu Jan 1 00:00:00 1970 From: Danny Milosavljevic Subject: [PATCH 3/5] gnu: arduino: Add arduino-hardware Date: Tue, 16 Aug 2016 20:36:30 +0200 Message-ID: <20160816183632.30820-4-dannym@scratchpost.org> References: <20160816183632.30820-1-dannym@scratchpost.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------2.9.1" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44533) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bZjEC-0000Pi-3t for guix-devel@gnu.org; Tue, 16 Aug 2016 14:36:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bZjEA-0005Md-QE for guix-devel@gnu.org; Tue, 16 Aug 2016 14:36:44 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:45015) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bZjEA-0005MR-EY for guix-devel@gnu.org; Tue, 16 Aug 2016 14:36:42 -0400 In-Reply-To: <20160816183632.30820-1-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: guix-devel@gnu.org This is a multi-part message in MIME format. --------------2.9.1 Content-Type: text/plain; charset=UTF-8; format=fixed Content-Transfer-Encoding: quoted-printable * gnu/packages/arduino.scm (arduino-hardware): New variable. --- gnu/packages/arduino.scm | 53 ++++++++++++++++++++++++++++++++++++++++++= ++++++ 1 file changed, 53 insertions(+) --------------2.9.1 Content-Type: text/x-patch; name="0003-gnu-arduino-Add-arduino-hardware.patch" Content-Disposition: attachment; filename="0003-gnu-arduino-Add-arduino-hardware.patch" Content-Transfer-Encoding: quoted-printable 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)))) =20 +(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/ar= chive/" version ".tar.gz")) + (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")))) + (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 + (lambda* (#:key inputs outputs #:allow-other-keys) + ;; this is intended to just prepare arduino inputs where i= ts build system expects them + (for-each (lambda (input) + (let* ((key (car input)) + (out-dir (assoc-ref outputs "out")) + (destination-dir (string-append out-dir= "/share/arduino"))) + (if (string-prefix? "arduino-" key) + (let* ((basename + (string-drop key (string-length "= arduino-"))) + (target-outdir (assoc-ref inputs ke= y)) + (target-dir (string-append target-o= utdir "/share/arduino")) + (target (string-append target-dir "= /" basename)) + (destination (string-append destina= tion-dir "/" basename))) + (mkdir-p destination-dir) + (symlink target destination) + #t)))) + inputs) + #t)) + (add-before 'build 'chdir + (lambda _ + (chdir "hardware"))) + (replace 'install ,(arduino-installer "hardware"))))) + (home-page "https://www.arduino.cc/") + (synopsis "Arduino Hardware Spec Files") + (description "arduino-hardware contains Arduino Hardware Spec Files = (boards.txt etc).") + ;; GPL covers the main body ("app", "core"). LGPL covers the remaind= er. + (license license:lgpl2.1+))) ; FIXME check --------------2.9.1--