devShells.zephyr: add extraAttrs and extraPackages
This commit is contained in:
parent
0454b989b5
commit
3de0f648f8
|
@ -1,6 +1,6 @@
|
|||
{ lib, mkShell, zephyr, cmake, ninja, gnumake, python3
|
||||
, toolchains ? with zephyr.toolchains; [ arm-zephyr-eabi ], enableWest ? false
|
||||
, zephyrSrc ? null }:
|
||||
, zephyrSrc ? null, extraPackages ? [ ], extraAttrs ? { } }:
|
||||
let zephyr-sdk = zephyr.sdk.override { inherit toolchains; };
|
||||
in mkShell {
|
||||
packages = [ cmake ninja gnumake python3 ] ++ (with python3.pkgs;
|
||||
|
@ -18,7 +18,7 @@ in mkShell {
|
|||
requests
|
||||
anytree
|
||||
intelhex
|
||||
] ++ lib.optional enableWest python3.pkgs.west);
|
||||
] ++ lib.optional enableWest python3.pkgs.west ++ extraPackages);
|
||||
|
||||
ZEPHYR_TOOLCHAIN_VARIANT = "zephyr";
|
||||
ZEPHYR_SDK_INSTALL_DIR = "${zephyr-sdk}";
|
||||
|
@ -27,4 +27,4 @@ in mkShell {
|
|||
shellHook = ''
|
||||
PATH="${zephyrSrc}/scripts:$PATH"
|
||||
'';
|
||||
}
|
||||
} // extraAttrs
|
||||
|
|
Loading…
Reference in a new issue