From: Danny Milosavljevic <dannym@scratchpost.org>
To: guix-devel@gnu.org
Subject: [PATCH v2 1/2] gnu: Add arduino-libraries.
Date: Tue, 30 Aug 2016 18:40:36 +0200 [thread overview]
Message-ID: <20160830164037.26621-2-dannym@scratchpost.org> (raw)
In-Reply-To: <20160830164037.26621-1-dannym@scratchpost.org>
* gnu/local.mk: Add gnu/packages/arduino.scm
* gnu/packages/arduino.scm (arduino-installer, arduino-libraries): New variables.
---
gnu/local.mk | 2 ++
gnu/packages/arduino.scm | 90 ++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 92 insertions(+)
create mode 100644 gnu/packages/arduino.scm
diff --git a/gnu/local.mk b/gnu/local.mk
index 7ce8ad0..2717e44 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -40,6 +40,7 @@ GNU_SYSTEM_MODULES = \
%D%/packages/anthy.scm \
%D%/packages/apl.scm \
%D%/packages/apr.scm \
+ %D%/packages/arduino.scm \
%D%/packages/aspell.scm \
%D%/packages/assembly.scm \
%D%/packages/attr.scm \
@@ -604,6 +605,7 @@ dist_patch_DATA = \
%D%/packages/patches/kmod-module-directory.patch \
%D%/packages/patches/laby-make-install.patch \
%D%/packages/patches/ldc-disable-tests.patch \
+ %D%/packages/patches/ldc-0.17.1-disable-tests.patch \
%D%/packages/patches/lftp-dont-save-unknown-host-fingerprint.patch \
%D%/packages/patches/liba52-enable-pic.patch \
%D%/packages/patches/liba52-link-with-libm.patch \
diff --git a/gnu/packages/arduino.scm b/gnu/packages/arduino.scm
new file mode 100644
index 0000000..6649456
--- /dev/null
+++ b/gnu/packages/arduino.scm
@@ -0,0 +1,90 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2016 Danny Milosavljevic <dannym@scratchpost.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 arduino)
+ #:use-module ((guix licenses) #:prefix license:)
+ #:use-module (guix utils)
+ #:use-module (guix download)
+ #:use-module (guix packages)
+ #:use-module (guix build-system gnu)
+ #:use-module (guix build-system python)
+ #:use-module (guix build-system ant)
+ #:use-module (gnu packages)
+ #:use-module (gnu packages avr)
+ #:use-module (gnu packages flashing-tools)
+ #:use-module (gnu packages java)
+ #:use-module (gnu packages python))
+
+(define (arduino-installer filenames)
+ `(lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (out-share (string-append out "/share/arduino")))
+ (mkdir-p out-share)
+ (for-each
+ (lambda (filename)
+ (let* ((out-share-part (string-append out-share "/" filename)))
+ (copy-recursively filename out-share-part)))
+ (list ,@filenames)))))
+
+(define-public arduino-libraries
+ (package
+ (name "arduino-libraries")
+ (version "1.6.10")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/arduino/Arduino/"
+ "archive/" 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$"))
+ ;; Delete non-Free Software
+ (delete-file-recursively "libraries/WiFi/extras/wifiHD")
+ (delete-file-recursively "libraries/WiFi/extras/wifi_dnld")
+ #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)
+ (replace 'install ,(arduino-installer '("libraries" "hardware"))))))
+ (home-page "https://www.arduino.cc/")
+ (synopsis "Arduino Libraries and Hardware Spec Files")
+ (description "{arduino-libraries contains libraries and Arduino
+hardware spec files (boards.txt).")
+ ;; GPL covers the main body ("app", "core"). lgpl2.1+ covers the remainder mostly.
+ ;; Exceptions are:
+ ;; libraries/Ethernet/src/Dns*: asl2.0
+ ;; libraries/Ethernet/src/EthernetUdp*: expat
+ ;; libraries/Ethernet/src/utility/w5100*: lgpl2.1
+ ;; libraries/SD: gpl3+
+ ;; libraries/TFT: bsd-3
+ ;; libraries/WiFi: bsd-3
+ (license (list license:lgpl2.1+
+ license:asl2.0
+ license:expat
+ license:bsd-3))))
next prev parent reply other threads:[~2016-08-30 16:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-30 16:40 [PATCH v2 0/2] Add Arduino tools Danny Milosavljevic
2016-08-30 16:40 ` Danny Milosavljevic [this message]
2016-08-30 16:40 ` [PATCH v2 2/2] gnu: Add arduino-makefile 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=20160830164037.26621-2-dannym@scratchpost.org \
--to=dannym@scratchpost.org \
--cc=guix-devel@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.