devShells.zephyr: add extraAttrs and extraPackages

This commit is contained in:
Artemis Tosini 2023-11-12 21:21:51 +00:00
parent 0454b989b5
commit 3de0f648f8
Signed by: artemist
GPG key ID: ADFFE553DCBB831E

View file

@ -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