The process of building a snap is made up of running each part through a lifecycle of steps. These steps are, in order:

  1. pull
    Fetch the part’s source, as well as its stage-packages

  2. build
    Build this part (e.g. compile it) and install it to a designated area

  3. stage
    Put the material installed by the build step in the common staging area for potential use by other parts(eg. providing the required library for building it)

  4. prime
    Migrate this part’s staged material into the final priming area

After all of these steps have run for each part, the final step is the pack step, which packs the priming area into the final snap (a squashfs image).