Nixpkgs/Create and debug packages: Difference between revisions

imported>Tobias.bora
Add explanation when the builder is not the default one.
imported>Dudebout
m nix-shell already sources $stdenv/setup. Doing it a second time actually can lead to conflicts and problems.
Line 185: Line 185:
$ export out=~/tmpdev/bc-build/out
$ export out=~/tmpdev/bc-build/out
$ set -x # Optional: it prints all commands, can be practical to debug
$ set -x # Optional: it prints all commands, can be practical to debug
$ source $stdenv/setup # Important to ensure the `PATH` (and other variables) are the one specified in your derivation and not from the system
$ set +e # Quite practical if you don't want to quit the shell on errors/Ctrl+C ($stdenv/setup does `set -eu`)
$ genericBuild
$ genericBuild
</syntaxhighlight>
</syntaxhighlight>