nixpkgs.url="github:nixos/nixpkgs/nixos-unstable";# Using the unstable channel for the latest packages, while flake.lock fixates the commit reused until changed.
flake-utils.url="github:numtide/flake-utils";# Utilities for flake functionality.
pkgs=nixpkgs.legacyPackages.${system};# Accessing the legacy package set.
lib=pkgs.lib;# The standard Nix packages library.
# Dependencies are the packages required for the Heads project.
# Organized into subsets for clarity and maintainability.
deps=withpkgs;[
# Core build utilities
autoconf
automake
bashInteractive
coreutils
bc
bison
bzip2
cacert
ccache
cmake
cpio
curl
diffutils
dtc
e2fsprogs
elfutils
findutils
flex
gawk
git
gnat
gnugrep
gnumake
gnused
gnutar
gzip
imagemagick# For bootsplash manipulation.
innoextract# ROM extraction for dGPU.
libtool
m4
ncurses5
openssl
parted
patch
perl
pkg-config
python3# me_cleaner, coreboot.
rsync# coreboot.
sharutils
texinfo
unzip
wget
which
xz
zip
zlib
zlib.dev
]++[
# Packages for qemu support with Canokey integration.
qemu# To test make BOARD=qemu-coreboot-* boards and then call make BOARD=qemu-coreboot-* with inject_gpg statement, and then run statement (RTFM).
canokey-qemu# Canokey lib for qemu build-time compilation.
(qemu.override{
canokeySupport=true;# This override enables Canokey support in QEMU, resulting in -device canokey being available.
})
]++[
# Additional tools for editing and testing.
vim# Mostly used amongst us, sorry if you'd like something else, open issue.
swtpm# QEMU requirement to emulate tpm1/tpm2.
dosfstools# QEMU requirement to produce valid fs to store exported public key to be fused through inject_key on qemu (so qemu flashrom emulated SPI support).
]++[
# Tools for handling binary blobs and compression.
bundler
p7zip
ruby
sudo
upx
];
# Stripping binaries to reduce size, while ensuring functionality is not affected.