Nixpkgs/Create and debug packages: Difference between revisions
imported>Tobias.bora No edit summary |
imported>Tobias.bora Add explanation when the builder is not the default one. |
||
Line 163: | Line 163: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
You would have seen the dependencies downloading, but the ''bc-build'' directory remains empty. The build system would next invoke '''genericBuild()'''. | You would have seen the dependencies downloading, but the ''bc-build'' directory remains empty. The build system would next invoke a builder with some arguments. You can obtain the exact name of the builder (usually '''bash''') and the arguments '''args''' of the builder (typically a shell script) by checking the corresponding value in: | ||
<syntaxhighlight lang="bash"> | |||
$ nix show-derivation $(nix-instantiate .) | |||
</syntaxhighlight> | |||
However, most of the time (for instance when using '''stdenv''' ) the [https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/default-builder.sh default builder] invokes first '''source $stdenv/setup''' to load the appropriate environment variables, and then '''genericBuild()'''. This is a shell function defined by [https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh stdenv] that you can review like this... | |||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
$ typeset -f genericBuild | less | $ typeset -f genericBuild | less |