2023-11-12 19:10:00 +00:00
|
|
|
{ lib, mkShell, zephyr, cmake, ninja, gnumake, python3
|
|
|
|
, toolchains ? with zephyr.toolchains; [ arm-zephyr-eabi ], enableWest ? false
|
2023-11-12 21:21:51 +00:00
|
|
|
, zephyrSrc ? null, extraPackages ? [ ], extraAttrs ? { } }:
|
2023-11-12 05:10:09 +00:00
|
|
|
let zephyr-sdk = zephyr.sdk.override { inherit toolchains; };
|
2023-11-12 22:24:55 +00:00
|
|
|
in mkShell ({
|
2023-11-12 19:10:00 +00:00
|
|
|
packages = [ cmake ninja gnumake python3 ] ++ (with python3.pkgs;
|
|
|
|
[
|
|
|
|
# requirements-base.txt
|
|
|
|
pyelftools
|
|
|
|
pyyaml
|
|
|
|
pykwalify
|
|
|
|
canopen
|
|
|
|
packaging
|
|
|
|
progress
|
|
|
|
psutil
|
|
|
|
pylink-square
|
|
|
|
pyserial
|
|
|
|
requests
|
|
|
|
anytree
|
|
|
|
intelhex
|
2023-11-12 21:21:51 +00:00
|
|
|
] ++ lib.optional enableWest python3.pkgs.west ++ extraPackages);
|
2023-11-12 05:10:09 +00:00
|
|
|
|
|
|
|
ZEPHYR_TOOLCHAIN_VARIANT = "zephyr";
|
|
|
|
ZEPHYR_SDK_INSTALL_DIR = "${zephyr-sdk}";
|
2023-11-12 19:10:00 +00:00
|
|
|
} // lib.optionalAttrs (zephyrSrc != null) {
|
|
|
|
ZEPHYR_BASE = "${zephyrSrc}";
|
|
|
|
shellHook = ''
|
|
|
|
PATH="${zephyrSrc}/scripts:$PATH"
|
|
|
|
'';
|
2023-11-12 22:24:55 +00:00
|
|
|
} // extraAttrs)
|