Low-level derivations: Difference between revisions
→Nixpkgs utilities: fix highlighting |
m →A Hello, world example: Fix typo |
||
Line 65: | Line 65: | ||
Building the package again, we'll come across another surprising error: | Building the package again, we'll come across another surprising error: | ||
{{code| | {{code|line=no|lang=console|highlight=8| | ||
$ nix-build example.nix | $ nix-build example.nix | ||
this derivation will be built: | this derivation will be built: | ||
Line 80: | Line 80: | ||
Turns out <code>chmod</code> is not part of our build environment either; that's how minimal the low-level derivation environment is! However, before we fix the script in a similar manner, let's observe another important detail: the store path. Compare the build location of this example, and the previous one; the SHAs are different! That is because our derivation has different inputs to the one before, therefore it's built under a different location in the Nix store. And to highlight this, without fixing the script, let's build it again: | Turns out <code>chmod</code> is not part of our build environment either; that's how minimal the low-level derivation environment is! However, before we fix the script in a similar manner, let's observe another important detail: the store path. Compare the build location of this example, and the previous one; the SHAs are different! That is because our derivation has different inputs to the one before, therefore it's built under a different location in the Nix store. And to highlight this, without fixing the script, let's build it again: | ||
{{code| | {{code|line=no|lang=console|highlight=3| | ||
$ nix-build example.nix | $ nix-build example.nix | ||
this derivation will be built: | this derivation will be built: |