From 8483d4813a15a11d3d6d1798850897e98eac84bd Mon Sep 17 00:00:00 2001 From: Artemis Tosini Date: Mon, 13 Nov 2023 05:59:59 +0000 Subject: [PATCH] devShells.zephyr: add option for modules --- shells/zephyr/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/shells/zephyr/default.nix b/shells/zephyr/default.nix index 9eee9e1..91cd3c6 100644 --- a/shells/zephyr/default.nix +++ b/shells/zephyr/default.nix @@ -1,6 +1,7 @@ { lib, mkShell, zephyr, cmake, ninja, gnumake, python3 , 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; }; in mkShell ({ packages = [ cmake ninja gnumake python3 ] ++ (with python3.pkgs; @@ -27,4 +28,6 @@ in mkShell ({ shellHook = '' PATH="${zephyrSrc}/scripts:$PATH" ''; +} // lib.optionalAttrs (modules != [ ]) { + ZEPHYR_MODULES = lib.concatStringsSep ";" (map (pkg: pkg.out) modules); } // extraAttrs)