From baed737e2f8a17f208090aabbffb41e12b923b39 Mon Sep 17 00:00:00 2001 From: Dom H Date: Sun, 16 Jan 2022 18:44:45 +0000 Subject: [PATCH] fix(setup): Fetch Zephyr requirements from URL The requirements cannot be read from the file in `./zephyr/` because this directory does not yet exist in a clean repo. Fetching the requirements file from an upstream URL is consistent with how the ZMK docker image does it: https://github.com/zmkfirmware/zmk-docker/blob/25972e7aad57a2b48f6141185711943cf76fc03b/Dockerfile#L26-L27 --- shell.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/shell.nix b/shell.nix index e34f20c8..f36dc2e2 100644 --- a/shell.nix +++ b/shell.nix @@ -9,8 +9,12 @@ let inherit (lib) ; }) { python = "python3"; }; + zephyr-requirements = fetchurl { + url = "https://raw.githubusercontent.com/zephyrproject-rtos/zephyr/v2.5.0/scripts/requirements-base.txt"; + sha256 = "919a78ba9457a8e55451450329158ff7fdcbc4a2ddb0dd76ea804c3b04a3c6c6"; + }; machNix = mach-nix.mkPython rec { - requirements = builtins.readFile ./zephyr/scripts/requirements-base.txt; + requirements = builtins.readFile zephyr-requirements; }; in mkShell { buildInputs = [