diff --git a/flake.nix b/flake.nix index 321e2a7..7282d6f 100644 --- a/flake.nix +++ b/flake.nix @@ -1,6 +1,6 @@ { inputs = { - # Pin to 23.11 to provide python38 dependency for sdk + # Pin this to 23.11 to provide py3.8 needed for the sdk-ng without building it ourselves nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11"; # Zephyr version determining which requirements.txt to use to install python dependencies @@ -14,13 +14,15 @@ }; outputs = { self, nixpkgs, zephyr-nix, ... }: let + # Set your system ("x86_64-linux", "aarch64-linux", "x86_64-darwin", or "aarch64-darwin") system = "x86_64-linux"; pkgs = nixpkgs.legacyPackages.${system}; zephyr = zephyr-nix.packages.${system}; in { devShells.${system}.default = pkgs.mkShell { packages = [ - zephyr.hosttools + # zephyr.hosttools-nix + # (zephyr.pythonEnv.override {extraPackages = pkgs: [pkgs.pyyaml];}) zephyr.pythonEnv zephyr.sdkFull pkgs.cmake diff --git a/readme.md b/readme.md index 85d044a..a660f30 100644 --- a/readme.md +++ b/readme.md @@ -308,11 +308,16 @@ environment is _completely isolated_ and won't pollute your system. 1. Clone _your fork_ of this repository. I like to name it `zmk-workspace` as it will be the toplevel of the development environment. + ```bash # Replace `urob` with your username git clone https://github.com/urob/zmk-config zmk-workspace ``` -2. Enter the workspace and set up the environment. + +2. If on `macOS`, edit `flake.nix` and replace `system = "x86_64-linux` with + `"x86_64-darwin"` (Intel processor) or `"aarch64-darwin"` (Apple silicon). + +3. Enter the workspace and set up the environment. ```bash # This automatically sets up and activates a virtual shell with the Zephyr toolchain.