Commit 186e4e9
flake.nix: Fix Python environment for nix build
The build was failing because Python packages in nativeBuildInputs
weren't available to the Python interpreter that CMake uses. This
happened due to nixpkgs changes in how Python packages work.
Changes:
- Create bundled Python environment using python.withPackages
- Add Python dependencies to zmake package so its sys.executable
has access to required modules (pyyaml, pykwalify, etc.)
- Patch zmake to use bundled Python for CMake's Python3_EXECUTABLE
- Use --static flag to skip git version detection (sources don't
have .git directories in nix build)
- Explicitly set ZEPHYR_SDK_INSTALL_DIR and force zephyr toolchain
- Update devShell to use bundled Python
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>1 parent 21180a2 commit 186e4e9
1 file changed
Lines changed: 29 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
37 | 47 | | |
38 | 48 | | |
39 | 49 | | |
| |||
84 | 94 | | |
85 | 95 | | |
86 | 96 | | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
| 97 | + | |
92 | 98 | | |
93 | 99 | | |
94 | 100 | | |
95 | 101 | | |
96 | 102 | | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
97 | 106 | | |
98 | | - | |
| 107 | + | |
99 | 108 | | |
100 | 109 | | |
101 | 110 | | |
| |||
121 | 130 | | |
122 | 131 | | |
123 | 132 | | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
124 | 143 | | |
125 | 144 | | |
126 | 145 | | |
127 | 146 | | |
128 | 147 | | |
129 | 148 | | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
130 | 152 | | |
131 | 153 | | |
132 | 154 | | |
| |||
206 | 228 | | |
207 | 229 | | |
208 | 230 | | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
| 231 | + | |
215 | 232 | | |
216 | 233 | | |
217 | 234 | | |
| |||
0 commit comments