This PR is my proposal on how to make the build process more modular and overridable by extracting the arguments passed to the make into a preBuild phase and re-using the default buildPhase for make from nixpkgs.
Also, more code moved from buildPhase to configurePhase. In my opinion, it makes more sense there, as it prepares the code for the build, rather than doing anything related to the build itself.
This PR is my proposal on how to make the build process more modular and overridable by extracting the arguments passed to the
make
into apreBuild
phase and re-using the defaultbuildPhase
formake
from nixpkgs. Also, more code moved frombuildPhase
toconfigurePhase
. In my opinion, it makes more sense there, as it prepares the code for the build, rather than doing anything related to the build itself.With this approach, applying client-side overrides like https://github.com/astro/nix-openwrt-imagebuilder/issues/38 should be easier now.
Let me know what you think.