|
4 | 4 | # Inputs define external dependencies and their sources. |
5 | 5 | inputs = { |
6 | 6 | nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; # Using the unstable channel for the latest packages, while flake.lock fixates the commit reused until changed. |
| 7 | + # Pinned nixpkgs for sdcc 4.2.0 — matches Debian oldstable. |
| 8 | + # Requires (void) prototype patches (included in patches/dasharo-ec). |
| 9 | + # sdcc 4.5.0 has optimizer bug ("EVELYN the modified DOG") on smfi.c. |
| 10 | + nixpkgs-sdcc.url = "github:nixos/nixpkgs/7a339d87931bba829f68e94621536cad9132971a"; |
7 | 11 | flake-utils.url = "github:numtide/flake-utils"; # Utilities for flake functionality. |
8 | 12 | }; |
9 | 13 | # Outputs are the result of the flake, including the development environment and Docker image. |
10 | 14 | outputs = { |
11 | 15 | self, |
12 | 16 | flake-utils, |
13 | 17 | nixpkgs, |
| 18 | + nixpkgs-sdcc, |
14 | 19 | ... |
15 | 20 | }: |
16 | 21 | flake-utils.lib.eachDefaultSystem (system: let |
17 | 22 | pkgs = nixpkgs.legacyPackages.${system}; # Accessing the legacy package set. |
| 23 | + pkgs-sdcc = nixpkgs-sdcc.legacyPackages.${system}; # Pinned for sdcc 4.2.0 |
18 | 24 | lib = pkgs.lib; # The standard Nix packages library. |
19 | 25 |
|
20 | 26 | # Dependencies are the packages required for the Heads project. |
21 | 27 | # Organized into subsets for clarity and maintainability. |
22 | 28 | deps = with pkgs; [ |
23 | 29 | # Core build utilities |
24 | 30 | autoconf |
25 | | - avrdude # Dasharo EC build |
26 | 31 | automake |
27 | 32 | bashInteractive |
28 | 33 | coreutils #basic tools like ls, cp, mv, kill) |
29 | 34 | bc |
30 | 35 | bison # Generate flashmap descriptor parser |
31 | 36 | bzip2 |
32 | | - cargo # Dasharo EC build |
33 | 37 | cacert |
34 | 38 | ccache |
35 | 39 | coreboot-utils #consumed by diffoscope for ifdtool cbfsutils etc |
|
61 | 65 | patch |
62 | 66 | perl |
63 | 67 | pkg-config |
64 | | - pkgsCross.avr.buildPackages.gcc # Dasharo EC build |
65 | | - pkgsCross.avr.libcCross # Dasharo EC build |
66 | 68 | procps #process tools like free, pidof, pkill, top, vmstat, watch, etc |
67 | 69 | psmisc #process tools like killall, pstree, etc |
68 | 70 | python3 # me_cleaner, coreboot |
69 | 71 | rsync # coreboot |
70 | | - sdcc # Dasharo EC build |
| 72 | + pkgs-sdcc.sdcc # Dasharo EC build — pinned to 4.2.0 (matches Debian oldstable, 4.5 has optimizer bug) |
71 | 73 | sharutils |
72 | 74 | texinfo |
73 | 75 | unzip |
74 | 76 | wget |
75 | 77 | which |
| 78 | + xxd # Dasharo EC build |
76 | 79 | xz |
77 | 80 | zip |
78 | 81 | zlib |
|
0 commit comments