From 5ea1fa86ee32d6407a349ef2653d7ad1a7b8001d Mon Sep 17 00:00:00 2001 From: Dom H Date: Sat, 4 Dec 2021 10:56:54 +0000 Subject: [PATCH] fix(setup): Add zephyr requirements to nix-shell Use mach-nix to handle zephyr's python requirements. --- shell.nix | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/shell.nix b/shell.nix index 145f7115..e34f20c8 100644 --- a/shell.nix +++ b/shell.nix @@ -3,6 +3,15 @@ with pkgs; let inherit (lib) ; + mach-nix = import (builtins.fetchGit { + url = "https://github.com/DavHau/mach-nix"; + ref = "master"; + }) { + python = "python3"; + }; + machNix = mach-nix.mkPython rec { + requirements = builtins.readFile ./zephyr/scripts/requirements-base.txt; + }; in mkShell { buildInputs = [ cmake @@ -11,9 +20,7 @@ in mkShell { dtc dfu-util gcc-arm-embedded - python3 - python38Packages.west - python38Packages.pip + machNix ]; shellHook = ''