devShells.zephyr: add option for modules
This commit is contained in:
parent
da07bd75a0
commit
8483d4813a
|
@ -1,6 +1,7 @@
|
||||||
{ lib, mkShell, zephyr, cmake, ninja, gnumake, python3
|
{ lib, mkShell, zephyr, cmake, ninja, gnumake, python3
|
||||||
, toolchains ? with zephyr.toolchains; [ arm-zephyr-eabi ], enableWest ? false
|
, toolchains ? with zephyr.toolchains; [ arm-zephyr-eabi ], enableWest ? false
|
||||||
, zephyrSrc ? null, extraPackages ? [ ], extraAttrs ? { } }:
|
, zephyrSrc ? zephyr.src, modules ? [ ], extraPackages ? [ ], extraAttrs ? { }
|
||||||
|
}:
|
||||||
let zephyr-sdk = zephyr.sdk.override { inherit toolchains; };
|
let zephyr-sdk = zephyr.sdk.override { inherit toolchains; };
|
||||||
in mkShell ({
|
in mkShell ({
|
||||||
packages = [ cmake ninja gnumake python3 ] ++ (with python3.pkgs;
|
packages = [ cmake ninja gnumake python3 ] ++ (with python3.pkgs;
|
||||||
|
@ -27,4 +28,6 @@ in mkShell ({
|
||||||
shellHook = ''
|
shellHook = ''
|
||||||
PATH="${zephyrSrc}/scripts:$PATH"
|
PATH="${zephyrSrc}/scripts:$PATH"
|
||||||
'';
|
'';
|
||||||
|
} // lib.optionalAttrs (modules != [ ]) {
|
||||||
|
ZEPHYR_MODULES = lib.concatStringsSep ";" (map (pkg: pkg.out) modules);
|
||||||
} // extraAttrs)
|
} // extraAttrs)
|
||||||
|
|
Loading…
Reference in a new issue