272 lines
10 KiB
Scheme
272 lines
10 KiB
Scheme
;;; GNU Guix --- Functional package management for GNU
|
|
;;;
|
|
;;; Copyright © 2023 Stefan <stefan-guix@vodafonemail.de>
|
|
;;;
|
|
;;; This file is not 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 (zephyr modules)
|
|
#:use-module (guix gexp)
|
|
#:use-module (guix build-system copy)
|
|
#:use-module (guix git-download)
|
|
#:use-module ((guix licenses)
|
|
#:prefix license:)
|
|
#:use-module (guix packages)
|
|
#:use-module (ice-9 regex)
|
|
#:use-module (zephyr))
|
|
|
|
(define-public (zephyr-module-installation-target zephyr-module)
|
|
"Return the target directory for the install-plan of the copy-build-system for
|
|
the ZEPHYR-MODULE package. It needs to match a certain pattern to collect
|
|
search-paths for zephyr-modules in the ZEPHYR_MOUDULES environment variable."
|
|
(string-append
|
|
;; Add the needed prefix to the module name.
|
|
"/" %zephyr-module "/"
|
|
;; Get the module name from the usually prefixed package name.
|
|
(regexp-substitute #f (string-match "^(zephyr-module-|)"
|
|
(package-name zephyr-module))
|
|
"" 'post)))
|
|
|
|
(define-public zephyr-module-template
|
|
"Return a template package to inherit zephyr module packages from. It
|
|
provides the build-system and proper arguments."
|
|
(package
|
|
(name "zephyr-module-template")
|
|
(version "0")
|
|
(source #f)
|
|
(build-system copy-build-system)
|
|
(arguments
|
|
(list
|
|
#:install-plan
|
|
#~(list (list "." #$(zephyr-module-installation-target this-package)))))
|
|
(home-page #f)
|
|
(synopsis #f)
|
|
(description #f)
|
|
(license #f)))
|
|
|
|
(define-public zephyr-module-cmsis
|
|
(let ((revision "2")
|
|
(commit "dc9658a1723ad911303a48b53a3e08222f10c181"))
|
|
(package/inherit zephyr-module-template
|
|
(name "zephyr-module-cmsis")
|
|
(version (git-version "5.9.0" revision commit))
|
|
(source
|
|
(origin
|
|
(method git-fetch)
|
|
(uri (git-reference
|
|
(url "https://github.com/zephyrproject-rtos/cmsis")
|
|
(commit commit)))
|
|
(file-name (git-file-name name version))
|
|
(sha256
|
|
(base32 "0kyjmr2jvndnx1lpglg9rvcwbnb2abjksp0b9hydx366ivaza5xn"))))
|
|
(home-page "https://github.com/zephyrproject-rtos/cmsis")
|
|
(synopsis "Zephyr module for CMSIS")
|
|
(description
|
|
"Zephyr module providing the Common Microcontroller Software Interface
|
|
Standard.")
|
|
(license license:apsl2))))
|
|
|
|
(define-public zephyr-module-hal-nordic
|
|
(let ((revision "1")
|
|
(commit "2947109e8dbc06ab6645d404499b6b6f6b04f3cf"))
|
|
(package/inherit zephyr-module-template
|
|
(name "zephyr-module-hal-nordic")
|
|
(version (git-version "3.4.0" revision commit))
|
|
(source
|
|
(origin
|
|
(method git-fetch)
|
|
(uri (git-reference
|
|
(url "https://github.com/zephyrproject-rtos/hal_nordic")
|
|
(commit commit)))
|
|
(file-name (git-file-name name version))
|
|
(sha256
|
|
(base32 "1sjhlxn866ip944a9y6lg3j2nr2nn9awzvny723cfm84xmrvq0kf"))))
|
|
(home-page "https://github.com/zephyrproject-rtos/hal_nordic")
|
|
(synopsis "Zephyr module for Nordic Semiconductor's SoCs and SiPs")
|
|
(description
|
|
"Zephyr module providing the Hardware Abstraction Layer for Nordic
|
|
Semiconductor's SoCs and SiPs.
|
|
|
|
Supported SoCs and SiPs:
|
|
@itemize
|
|
@item nRF51 Series
|
|
@item nRF52805
|
|
@item nRF52810
|
|
@item nRF52811
|
|
@item nRF52820
|
|
@item nRF52832
|
|
@item nRF52833
|
|
@item nRF52840
|
|
@item nRF5340
|
|
@item nRF9131
|
|
@item nRF9160
|
|
@item nRF9161
|
|
@end itemize
|
|
")
|
|
(license license:bsd-3))))
|
|
|
|
(define-public zephyr-module-hal-nordic-3.1.0
|
|
(let ((revision "1")
|
|
(commit "d054a315eb888ba70e09e5f6decd4097b0276d1f"))
|
|
(package/inherit zephyr-module-hal-nordic
|
|
(name "zephyr-module-hal-nordic")
|
|
(version (git-version "3.1.0" revision commit))
|
|
(source
|
|
(origin
|
|
(method git-fetch)
|
|
(uri (git-reference
|
|
(url "https://github.com/zephyrproject-rtos/hal_nordic")
|
|
(commit commit)))
|
|
(file-name (git-file-name name version))
|
|
(sha256
|
|
(base32 "0ypny416ylb2w5jg4bg55xvfg0yhqlbrakzvm0w23lnamg49kd6j")))))))
|
|
|
|
(define-public zephyr-module-hal-stm32
|
|
(let ((revision "2")
|
|
(commit "89ef0a3383edebf661073073bcdf6e2836fe90ee"))
|
|
(package/inherit zephyr-module-template
|
|
(name "zephyr-module-hal-stm32")
|
|
;; Using highest version number listed in:
|
|
;; https://github.com/zephyrproject-rtos/hal_stm32/blob/main/stm32cube/common_ll/README.rst
|
|
(version (git-version "1.27.1" revision commit))
|
|
(source
|
|
(origin
|
|
(method git-fetch)
|
|
(uri (git-reference
|
|
(url "https://github.com/zephyrproject-rtos/hal_stm32")
|
|
(commit commit)))
|
|
(file-name (git-file-name name version))
|
|
(sha256
|
|
(base32 "0z7q5xg1rn9c3anjvi2kl0hgik3y3r25svwf97w1cjhjx1rhqmpv"))))
|
|
(home-page "https://github.com/zephyrproject-rtos/hal_stm32")
|
|
(synopsis "Zephyr module for STM32 microcontrollers")
|
|
(description
|
|
"Zephyr module providing the required STM32cube packages, dtsi files and
|
|
libraries needed to build a Zephyr application running on STM32 silicon.")
|
|
(license license:bsd-3))))
|
|
|
|
(define-public zephyr-module-lvgl-8.3.11
|
|
(let ((revision "1")
|
|
(commit "2b498e6f36d6b82ae1da12c8b7742e318624ecf5"))
|
|
(package/inherit zephyr-module-template
|
|
(name "zephyr-module-lvgl")
|
|
(version (git-version "8.4.0" revision commit)) ; Taken from lvgl.h.
|
|
(source
|
|
(origin
|
|
(method git-fetch)
|
|
(uri (git-reference
|
|
(url "https://github.com/zephyrproject-rtos/lvgl/")
|
|
(commit commit)))
|
|
(file-name (git-file-name name version))
|
|
(sha256
|
|
(base32 "09ch4zd0ha806jiasspvcxx526y663rw5gskyz9ikv9kcd5wdjks"))))
|
|
(home-page "https://github.com/zephyrproject-rtos/lvgl")
|
|
(synopsis "Zephyr module for LVGL")
|
|
(description
|
|
"Zephyr module providing LVGL, the Light and Versatile Graphics Library
|
|
for an embedded GUI with graphical elements, visual effects and a low memory
|
|
footprint.")
|
|
(license license:apsl2))))
|
|
|
|
(define-public zephyr-module-mbedtls
|
|
(let ((revision "1")
|
|
(commit "c38dc78d9a8dcbe43b898cc1171ab33ba3e6fc26"))
|
|
(package/inherit zephyr-module-template
|
|
(name "zephyr-module-mbedtls")
|
|
(version (git-version "3.4.0" revision commit))
|
|
(source
|
|
(origin
|
|
(method git-fetch)
|
|
(uri (git-reference
|
|
(url "https://github.com/zephyrproject-rtos/mbedtls")
|
|
(commit commit)))
|
|
(file-name (git-file-name name version))
|
|
(sha256
|
|
(base32 "0661myy0wjz38nypbyfw51x10mzg57syb5c28irblgjm2w25wbi7"))))
|
|
(home-page "https://github.com/zephyrproject-rtos/mbedtls")
|
|
(synopsis "Zephyr module for Mbed TLS")
|
|
(description
|
|
"Zephyr module providing Mbed TLS, a C library that implements
|
|
cryptographic primitives, X.509 certificate manipulation and the SSL/TLS and
|
|
DTLS protocols. Its small code footprint makes it suitable for embedded
|
|
systems.")
|
|
(license license:apsl2))))
|
|
|
|
(define-public zephyr-module-mcuboot
|
|
(let ((revision "1")
|
|
(commit "02267cfdb5b368c700e3ca6bf47ecc97924c9a56"))
|
|
(package/inherit zephyr-module-template
|
|
(name "zephyr-module-mcuboot")
|
|
(version (git-version "2.0.0" revision commit))
|
|
(source
|
|
(origin
|
|
(method git-fetch)
|
|
(uri (git-reference
|
|
(url "https://github.com/zephyrproject-rtos/mcuboot")
|
|
(commit commit)))
|
|
(file-name (git-file-name name version))
|
|
(sha256
|
|
(base32 "1xxsaz6fanv9k1gb9d9ch0klfd88daaxrdha14vhx8xfx1wdrsiv"))))
|
|
(home-page "https://github.com/zephyrproject-rtos/mcuboot")
|
|
(synopsis "Zephyr module for MCUboot")
|
|
(description
|
|
"Zephyr module providing the secure bootloader MCUboot for 32-bit
|
|
microcontrollers. It defines a common infrastructure for the bootloader and the
|
|
system flash layout on microcontroller systems, and provides a secure bootloader
|
|
that enables easy software upgrade.")
|
|
(license license:apsl2))))
|
|
|
|
(define-public zephyr-module-tinycrypt
|
|
(let ((revision "1")
|
|
(commit "3e9a49d2672ec01435ffbf0d788db6d95ef28de0"))
|
|
(package/inherit zephyr-module-template
|
|
(name "zephyr-module-tinycrypt")
|
|
(version (git-version "0.2.8" revision commit))
|
|
(source
|
|
(origin
|
|
(method git-fetch)
|
|
(uri (git-reference
|
|
(url "https://github.com/zephyrproject-rtos/tinycrypt")
|
|
(commit commit)))
|
|
(file-name (git-file-name name version))
|
|
(sha256
|
|
(base32 "19d2q9y23yzz9i383q3cldjl3k5mryx9762cab23zy3ijdnmj2z6"))))
|
|
(home-page "https://github.com/zephyrproject-rtos/tinycrypt")
|
|
(synopsis "Zephyr module for the TinyCrypt library")
|
|
(description "Zephyr module providing the TinyCrypt library.")
|
|
(license (license:non-copyleft "file://README.zephyr")))))
|
|
|
|
(define-public zephyr-module-zcbor
|
|
(let ((version "0.8.1"))
|
|
(package/inherit zephyr-module-template
|
|
(name "zephyr-module-zcbor")
|
|
(version version)
|
|
(source
|
|
(origin
|
|
(method git-fetch)
|
|
(uri (git-reference
|
|
(url "https://github.com/zephyrproject-rtos/zcbor")
|
|
(commit version)))
|
|
(file-name (git-file-name name version))
|
|
(sha256
|
|
(base32 "1sc8bvqqjqyaxdmnvp7hk4js1vwa1gpxahqc1i16d5sl8gp7h8v2"))))
|
|
(home-page "https://github.com/zephyrproject-rtos/zcbor")
|
|
(synopsis "Zephyr module for the zcbor library")
|
|
(description
|
|
"Zephyr module providing the zcbor low footprint CBOR (Concise Binary
|
|
Object Representation) library in the C language, tailored for use in
|
|
microcontrollers.")
|
|
(license license:apsl2))))
|