I would like to build a custom GCC package from the existing nixpkgs
definitions but using a git repository with my own patches as a source.
Is there a reasonably straightforward way to do this?
I know how to do something similar for LLVM, for example:
{
nixpkgs.overlays = [
(final: prev: {
custom-toolchain = {
llvmPackages = prev.llvmPackages_git.override {
gitRelease = null;
officialRelease = {
version = prev.llvmPackages_git.release_version;
rev-version = "19.0.0-custom-toolchain";
};
monorepoSrc = prev.fetchFromGitHub {
...
};
};
};
})
];
}
I’ve tried to look through the definitions for the gcc
packages but I don’t see any place where I can override the source in a similar way.