Add nix-shell

This commit is contained in:
Brian Romanko 2021-11-15 08:34:46 -08:00
parent d8119cd663
commit e362fea19a
3 changed files with 26 additions and 1 deletions

1
.envrc Normal file
View file

@ -0,0 +1 @@
use nix

1
.gitignore vendored
View file

@ -7,3 +7,4 @@
/build /build
*.DS_Store *.DS_Store
__pycache__ __pycache__
/.direnv

23
shell.nix Normal file
View file

@ -0,0 +1,23 @@
{ pkgs ? import <nixpkgs> { } }:
with pkgs;
let inherit (lib) ;
in mkShell {
buildInputs = [
cmake
ninja
python3
ccache
dtc
dfu-util
gcc-arm-embedded
python38Packages.west
python38Packages.pyelftools
];
shellHook = ''
export ZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb
export GNUARMEMB_TOOLCHAIN_PATH=${pkgs.gcc-arm-embedded}
'';
}