Subject: [bug#64375] [PATCH 4/4] gnu: Add platformio.

From: [email-masked]
Date: Tue, 29 Aug 2023 10:01:50 -0400

From: Peter Polidoro <[email-masked]>

* gnu/packages/embedded.scm (platformio): New variable.
---
 gnu/packages/embedded.scm | 58 ++++++++++++++++++++++++++++++++-------
 1 file changed, 48 insertions(+), 10 deletions(-)

diff --git a/gnu/packages/embedded.scm b/gnu/packages/embedded.scm
index 325013a627..e547e6cbe6 100644
--- a/gnu/packages/embedded.scm
+++ b/gnu/packages/embedded.scm
@@ -13,6 +13,7 @@
 ;;; Copyright © 2022 Mathieu Othacehe <[email-masked]>
 ;;; Copyright © 2022 Maxim Cournoyer <[email-masked]>
 ;;; Copyright © 2023 Janneke Nieuwenhuizen <[email-masked]>
+;;; Copyright © 2023 Peter Polidoro <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -40,6 +41,7 @@ (define-module (gnu packages embedded)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system python)
+  #:use-module (guix build-system pyproject)
   #:use-module (guix build-system trivial)
   #:use-module ((guix build utils) #:select (alist-replace delete-file-recursively))
   #:use-module (gnu packages)
@@ -1457,6 +1459,42 @@ (define-public west
 debugging them, and more.")
     (license license:expat)))
 
+(define-public platformio
+  (package
+    (name "platformio")
+    (version "6.1.10")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "platformio" version))
+              (sha256
+               (base32
+                "0n7yz19ckyq1x3q7lm3cvj2xsmzx3kvnxkwqzkq9hfkj1yzxash4"))))
+    (build-system pyproject-build-system)
+    (arguments
+     `(#:tests? #f)) ; FIXME: PermissionError: [Errno 13] Permission denied: '/homeless-shelter'
+    (propagated-inputs (list python-ajsonrpc
+                             python-bottle
+                             python-click
+                             python-colorama
+                             python-marshmallow
+                             python-pyelftools
+                             python-pyserial
+                             python-requests
+                             python-semantic-version
+                             python-starlette
+                             python-tabulate
+                             python-uvicorn
+                             python-wsproto))
+    (home-page "https://platformio.org")
+    (synopsis
+     "Your Gateway to Embedded Software Development Excellence. Unlock the true potential of embedded software development with PlatformIO's collaborative ecosystem, embracing declarative principles, test-driven methodologies, and modern toolchains for unrivaled success.")
+    (description
+     "Your Gateway to Embedded Software Development Excellence.  Unlock the true
+potential of embedded software development with @code{PlatformIO's}
+collaborative ecosystem, embracing declarative principles, test-driven
+methodologies, and modern toolchains for unrivaled success.")
+    (license license:asl2.0)))
+
 (define-public ebusd
   (package
     (name "ebusd")
@@ -1464,8 +1502,8 @@ (define-public ebusd
     (source (origin
               (method git-fetch)
               (uri (git-reference
-                     (url "https://github.com/john30/ebusd")
-                     (commit version)))
+                    (url "https://github.com/john30/ebusd")
+                    (commit version)))
               (file-name (string-append name "-" version "-checkout"))
               (sha256
                (base32
@@ -1491,14 +1529,14 @@ (define-public ebusd
        ("autoconf" ,autoconf)
        ("config"
         ,(origin
-              (method git-fetch)
-              (uri (git-reference
-                     (url "https://github.com/john30/ebusd-configuration")
-                     (commit "666c0f6b9c4d7545eff7f43ab28a1c7baeab7913")))
-              (file-name "config-checkout")
-              (sha256
-               (base32
-                "0yxnx8p4lbk614l16854r9s9d8s9c7ixgczfs8mph94xz0wkda7x"))))))
+           (method git-fetch)
+           (uri (git-reference
+                 (url "https://github.com/john30/ebusd-configuration")
+                 (commit "666c0f6b9c4d7545eff7f43ab28a1c7baeab7913")))
+           (file-name "config-checkout")
+           (sha256
+            (base32
+             "0yxnx8p4lbk614l16854r9s9d8s9c7ixgczfs8mph94xz0wkda7x"))))))
     (synopsis "Daemon for communicating with eBUS devices")
     (description "This package provides @command{ebusd}, a daemon for
 handling communication with eBUS devices connected to a 2-wire bus system
-- 
2.41.0