Previously we were unable to override individual attributes within the
coreboot-toolchain packageset. By using callPackage on each of the
attributes individually we retain the ability to call the override
function to inject custom dependencies into the build.
For reproducibility, the toolchain build system appends a specific
version string to the usual version string of the tools. Before 4.15,
the build system used git for that at runtime and since the .git
directory is removed by the NixOS build system, the version string was
empty and resulted in `v_`.
Now, the toolchain build system prefers using the environment variable
`CROSSGCC_VERSION` if set. Thus, extract the version string in the
postFetch phase and set `CROSSGCC_VERSION` in the build phase.
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Rework update script so that it needs to be run from the root directory
of nixpkgs and get rid of relative paths. Also, move the resulting file
`sources.nix` into the package directory.
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Add and adjust update script from
https://git.petabyte.dev/petabyteboy/corenix.
The script is meant to be run from the package directory of the
coreboot-toolchain. The script generates a sources.nix files, which
contains all sources used for the coreboot toolchain and some other
tools. Thus, it needs to be stripped down to the necessary sources.
Signed-off-by: Felix Singer <felixsinger@posteo.net>