diff options
-rwxr-xr-x | .bin/arduino-cli | 14 | ||||
-rw-r--r-- | .bin/jd-arduino-cli.Dockerfile | 16 | ||||
-rw-r--r-- | guix/jd/desktops/base.scm | 1 |
3 files changed, 31 insertions, 0 deletions
diff --git a/.bin/arduino-cli b/.bin/arduino-cli new file mode 100755 index 0000000..7c0d41a --- /dev/null +++ b/.bin/arduino-cli | |||
@@ -0,0 +1,14 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) | ||
4 | |||
5 | if [[ $(docker images | grep jd-arduino-cli | wc -l) -eq 0 ]] | ||
6 | then | ||
7 | docker build -f "$SCRIPT_DIR/jd-arduino-cli.Dockerfile" -t jd-arduino-cli . | ||
8 | fi | ||
9 | |||
10 | docker run --rm --network none -it --privileged \ | ||
11 | -v $(pwd):/src \ | ||
12 | -v jd-arduino-cli-tmp:/tmp \ | ||
13 | -v /dev:/dev jd-arduino-cli \ | ||
14 | arduino-cli $@ | ||
diff --git a/.bin/jd-arduino-cli.Dockerfile b/.bin/jd-arduino-cli.Dockerfile new file mode 100644 index 0000000..cb8eb91 --- /dev/null +++ b/.bin/jd-arduino-cli.Dockerfile | |||
@@ -0,0 +1,16 @@ | |||
1 | FROM python:3.12-rc-slim | ||
2 | |||
3 | RUN apt update && apt install -y wget && \ | ||
4 | wget https://downloads.arduino.cc/arduino-cli/nightly/arduino-cli_nightly-latest_Linux_64bit.tar.gz && \ | ||
5 | tar -C /usr/bin/ -xf arduino-cli_nightly-latest_Linux_64bit.tar.gz | ||
6 | |||
7 | RUN mkdir ~/.arduino15 && \ | ||
8 | echo "board_manager:" > ~/.arduino15/arduino-cli.yaml && \ | ||
9 | echo " additional_urls:" >> ~/.arduino15/arduino-cli.yaml && \ | ||
10 | echo " - http://arduino.esp8266.com/stable/package_esp8266com_index.json" >> ~/.arduino15/arduino-cli.yaml | ||
11 | |||
12 | |||
13 | RUN arduino-cli core update-index && \ | ||
14 | arduino-cli core install esp8266:esp8266 | ||
15 | |||
16 | WORKDIR /src \ No newline at end of file | ||
diff --git a/guix/jd/desktops/base.scm b/guix/jd/desktops/base.scm index d93d878..656c622 100644 --- a/guix/jd/desktops/base.scm +++ b/guix/jd/desktops/base.scm | |||
@@ -79,6 +79,7 @@ | |||
79 | "docker" | 79 | "docker" |
80 | "audio" ;; control audio devices | 80 | "audio" ;; control audio devices |
81 | "video" ;; access to webcam | 81 | "video" ;; access to webcam |
82 | "dialout" ;; access to /dev/ttyUSBX devices | ||
82 | ))) | 83 | ))) |
83 | %base-user-accounts)) | 84 | %base-user-accounts)) |
84 | 85 | ||