224 lines
8.5 KiB
Scheme
224 lines
8.5 KiB
Scheme
|
(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 "/" %zephyr-module-tag
|
||
|
;; 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 "1")
|
||
|
(commit "74981bf893e8b10931464b9945e2143d99a3f0a3"))
|
||
|
(package/inherit zephyr-module-template
|
||
|
(name "zephyr-module-cmsis")
|
||
|
(version (git-version "5.8.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
|
||
|
"11wwcdwzi5ac8k881616p69v7cz356cwvbqsmmfw3w3v63b9dsmy"))))
|
||
|
(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 "a1c3e0fbaafda091139b8744becd4853ada2f747"))
|
||
|
(package/inherit zephyr-module-template
|
||
|
(name "zephyr-module-hal-nordic")
|
||
|
(version (git-version "3.0.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
|
||
|
"1y0sz6m0fpfwxrsqrn29vvd5dxmk9804s4gwpxc9rdd79adklbab"))))
|
||
|
(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-2.11
|
||
|
(let ((revision "0")
|
||
|
(commit "5644a13252e5d12e3e841105d106cfdeb40e59f9"))
|
||
|
(package/inherit zephyr-module-hal-nordic
|
||
|
(name "zephyr-module-hal-nordic")
|
||
|
(version (git-version "2.11.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
|
||
|
"0lj7wlbfp9pb5pv819h9kbddmlzfbdnbmxhpm1i4xmf89z9v14sm")))))))
|
||
|
|
||
|
(define-public zephyr-module-hal-stm32
|
||
|
(let ((revision "1")
|
||
|
(commit "c865374fc83d93416c0f380e6310368ff55d6ce2"))
|
||
|
(package/inherit zephyr-module-template
|
||
|
(name "zephyr-module-hal-stm32")
|
||
|
(version (git-version "1.16.0" 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
|
||
|
"0q0ckial6a3lvlag44zm65dklbbdnqpzr1vbh85dhwx7acpjd5ni"))))
|
||
|
(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
|
||
|
(let ((revision "1")
|
||
|
(commit "70a7849726be8375e3d941153dc417823ea7f355"))
|
||
|
(package/inherit zephyr-module-template
|
||
|
(name "zephyr-module-lvgl")
|
||
|
(version (git-version "8.2.0" revision commit)) ; Taken from lvgl.h.
|
||
|
(source (origin
|
||
|
(method git-fetch)
|
||
|
(uri (git-reference
|
||
|
(url "https://github.com/zmkfirmware/lvgl")
|
||
|
(commit commit)))
|
||
|
(file-name (git-file-name name version))
|
||
|
(sha256
|
||
|
(base32
|
||
|
"147mykkb72nwbjhrw4z7h0kkxw4p7kvy0w001s44rgplxhqqsg98"))))
|
||
|
(home-page "https://github.com/zmkfirmware/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 "711fd5ea13a5e018cebe1ac1f79c22d897e8b34d"))
|
||
|
(package/inherit zephyr-module-template
|
||
|
(name "zephyr-module-mbedtls")
|
||
|
(version (git-version "3.3.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
|
||
|
"0lvvarwx735g2bc272n03gp8dsx0bn0i4cywmi6igrc6dyqwkabq"))))
|
||
|
(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 "74c4d1c52fd51d07904b27a7aa9b2303e896a4e3"))
|
||
|
(package/inherit zephyr-module-template
|
||
|
(name "zephyr-module-mcuboot")
|
||
|
(version (git-version "1.11.0-dev" 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
|
||
|
"14g95wjqxchv2vnpzld8in6ljlw6s2cj43nlyf6g8czyy5rx99qb"))))
|
||
|
(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")))))
|
||
|
|