checkpointedBuilds: add usage example based on virtualbox
This commit is contained in:
parent
3f4e3a862f
commit
8beb56244d
|
@ -2,10 +2,20 @@
|
||||||
rec {
|
rec {
|
||||||
/* Prepare a derivation for local builds.
|
/* Prepare a derivation for local builds.
|
||||||
*
|
*
|
||||||
* This function adds an additional outout for a derivation,
|
* This function adds an additional output for a derivation,
|
||||||
* containing the build output.
|
* containing the build output.
|
||||||
* The build output can be used later to allow incremental builds
|
* The build output can be used later to allow incremental builds
|
||||||
* by passing the `buildOut` output to the `mkIncrementalBuild` function.
|
* by passing the `buildOut` output to the `mkIncrementalBuild` function.
|
||||||
|
*
|
||||||
|
* To build a project incrementaly follow these steps:
|
||||||
|
* - run prepareIncrementalBuild on the desired derivation
|
||||||
|
* e.G `buildOutput = (pkgs.buildIncremental.prepareIncrementalBuild pkgs.virtualbox).buildOut;`
|
||||||
|
* - change something you want in the sources of the package( e.G using source override)
|
||||||
|
* changedVBox = pkgs.virtuabox.overrideAttrs (old: {
|
||||||
|
* src = path/to/vbox/sources;
|
||||||
|
* }
|
||||||
|
* - use `mkIncrementalBuild changedVBox buildOutput`
|
||||||
|
* - enjoy shorter build times
|
||||||
*/
|
*/
|
||||||
prepareIncrementalBuild = drv: drv.overrideAttrs (old: {
|
prepareIncrementalBuild = drv: drv.overrideAttrs (old: {
|
||||||
outputs = (old.outputs or [ "out" ]) ++ [ "buildOut" ];
|
outputs = (old.outputs or [ "out" ]) ++ [ "buildOut" ];
|
||||||
|
|
Loading…
Reference in New Issue
Block a user