Subject: [PATCH 2/3] gnu: Add arduino-libraries.

From: Danny Milosavljevic <[email-masked]>
Date: Wed, 3 Oct 2018 21:44:12 +0200

* gnu/packages/arduino.scm (arduino-libraries): New variable.
---
 gnu/packages/arduino.scm | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/gnu/packages/arduino.scm b/gnu/packages/arduino.scm
index 24f109ecd..369ca68a7 100644
--- a/gnu/packages/arduino.scm
+++ b/gnu/packages/arduino.scm
@@ -104,3 +104,21 @@
 (boards.txt etc).")
     ;; GPL covers the main body ("app", "core").  LGPL covers the remainder.
     (license (list license:lgpl2.1+ license:gpl3+))))
+
+(define-public arduino-libraries
+  (package (inherit arduino-hardware)
+    (name "arduino-libraries")
+    (inputs
+     `(("arduino-hardware" ,arduino-hardware)))
+    (arguments
+      (substitute-keyword-arguments
+        (package-arguments arduino-hardware)
+        ((#:phases phases)
+            `(modify-phases ,phases
+              (replace 'chdir
+                (lambda _
+                  (chdir "libraries")
+                  #t))
+              (replace 'install ,(arduino-installer "libraries"))))))
+    ;; Note: Some parts are BSD and ASL-2.0 licensed.
+    (license (list license:lgpl2.1+ license:gpl3+))))