# Stepping through builder steps in your custom packages

<p class="callout info">This article was originally published at [https://gist.github.com/joepie91/b0041188c043259e6e1059d026eff301](https://gist.github.com/joepie91/b0041188c043259e6e1059d026eff301). </p>

1. Create a temporary building folder in your repository (or elsewhere) and enter it: `mkdir test && cd test`
2. `nix-shell ../main.nix -A packagename` (assuming the entry point for your custom repository is `main.nix` in the parent directory)
3. Run the phases individually by entering their name (for a default phase) or doing something like `eval "$buildPhase"` (for an overridden phase) in the Nix shell - a summary of the common ones: `unpackPhase`, `patchPhase`, `configurePhase`, `buildPhase`, `checkPhase`, `installPhase`, `fixupPhase`, `distPhase`

More information about these phases can be found [here](https://nixos.org/releases/nixpkgs/nixpkgs-0.12/manual/#ssec-stdenv-phases). If you use a different builder, you may have a different set of phases.

Don't forget to clear out your `test` folder after every attempt!