File tree Expand file tree Collapse file tree 2 files changed +20
-10
lines changed
Expand file tree Collapse file tree 2 files changed +20
-10
lines changed Original file line number Diff line number Diff line change 11/result
2+ /src
3+ # ^-- added in nix fork
24build /
35/private * /
46# A "local" directory for hiding scripts and artifacts from git.
Original file line number Diff line number Diff line change 5353 "${ zephyr } ?zephyr"
5454 ] ;
5555
56- preUnpack = ''
56+ preUnpack = ''
5757 unpackCmdHooks+=(_unpack_named)
5858 _unpack_named() {
5959 local src="$1"
9595 dontUseCmakeConfigure = true ;
9696
9797 buildPhase = ''
98- ${ packages . zmake } /bin/zmake -j8 build ${ build } -DCMAKE_MAKE_PROGRAM=" ${ pkgs . ninja } /bin/ninja" -DBUILD_VERSION=" ${ build_version } "
98+ ${ packages . zmake } /bin/zmake -j8 build ${ build }
9999 '' ;
100100
101101 installPhase = ''
120120 build-system = [ pythonPkgs . setuptools ] ;
121121
122122 postPatch = ''
123- sed -e 's#"/bin:/usr/bin"#"/bin:/usr/bin:${ pkgs . gcc } /bin:${ pkgs . dtc } /bin"${
123+ sed -e 's#"/bin:/usr/bin"#"/bin:/usr/bin:${ pkgs . gcc } /bin:${ pkgs . dtc } /bin: ${ pkgs . ninja } /bin "${
124124 if pkgs . stdenv . hostPlatform . isDarwin
125125 then '',"DYLD_LIBRARY_PATH":"${ pkgs . dtc } /lib"''
126126 else ""
196196 buildInputs = [ pythonPkgs . setuptools ] ;
197197 } ;
198198
199- # TODO: local builds in your area
200199 devShells . default = pkgs . mkShell {
201- buildInputs = with pkgs ; [
200+ buildInputs = [
202201 zephyr-sdk
203- python
202+ pkgs . cmake
203+ pkgs . git
204+ pkgs . ninja
204205 pythonPkgs . pyyaml
205206 pythonPkgs . pykwalify
206207 pythonPkgs . packaging
207208 pythonPkgs . pyelftools
208209 pythonPkgs . colorama
209210 pythonPkgs . setuptools
210- pythonPkgs . libfdt
211- dtc
212- cmake
213- ninja
211+ packages . zmake
212+ packages . binman
214213 ] ;
214+
215+ shellHook = ''
216+ rm -rf src
217+ mkdir -p src/platform
218+ ln -fs ../.. src/platform/ec
219+ mkdir -p src/third_party/zephyr
220+ ln -fs ${ cmsis } src/third_party/zephyr/cmsis
221+ ln -fs ${ zephyr } src/third_party/zephyr/main
222+ '' ;
215223 } ;
216224 } ) ;
217225}
You can’t perform that action at this time.
0 commit comments