Merge pull request #1 from dxmh/nix
Use mach-nix to add zephyr requirements to nix-shell
This commit is contained in:
commit
0d5ca70afd
1 changed files with 14 additions and 3 deletions
17
shell.nix
17
shell.nix
|
@ -3,6 +3,19 @@
|
||||||
with pkgs;
|
with pkgs;
|
||||||
|
|
||||||
let inherit (lib) ;
|
let inherit (lib) ;
|
||||||
|
mach-nix = import (builtins.fetchGit {
|
||||||
|
url = "https://github.com/DavHau/mach-nix";
|
||||||
|
ref = "master";
|
||||||
|
}) {
|
||||||
|
python = "python3";
|
||||||
|
};
|
||||||
|
zephyr-requirements = fetchurl {
|
||||||
|
url = "https://raw.githubusercontent.com/zephyrproject-rtos/zephyr/v2.5.0/scripts/requirements-base.txt";
|
||||||
|
sha256 = "919a78ba9457a8e55451450329158ff7fdcbc4a2ddb0dd76ea804c3b04a3c6c6";
|
||||||
|
};
|
||||||
|
python-pkgs = mach-nix.mkPython rec {
|
||||||
|
requirements = builtins.readFile zephyr-requirements;
|
||||||
|
};
|
||||||
in mkShell {
|
in mkShell {
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
cmake
|
cmake
|
||||||
|
@ -11,9 +24,7 @@ in mkShell {
|
||||||
dtc
|
dtc
|
||||||
dfu-util
|
dfu-util
|
||||||
gcc-arm-embedded
|
gcc-arm-embedded
|
||||||
python3
|
python-pkgs
|
||||||
python38Packages.west
|
|
||||||
python38Packages.pip
|
|
||||||
];
|
];
|
||||||
|
|
||||||
shellHook = ''
|
shellHook = ''
|
||||||
|
|
Loading…
Add table
Reference in a new issue