mirror of
https://codeberg.org/mhwombat/nix-book.git
synced 2026-05-15 03:21:12 +08:00
apostrophe
This commit is contained in:
parent
ecde5c5b9e
commit
8c5b4f474c
1 changed files with 8 additions and 8 deletions
|
|
@ -1,7 +1,7 @@
|
|||
= Another look at hello-flake
|
||||
|
||||
Now that we have a better understanding of the structure of `flake.nix`,
|
||||
let’s have a look at the one we saw earlier, in the `hello-flake` repo.
|
||||
let's have a look at the one we saw earlier, in the `hello-flake` repo.
|
||||
If you compare this flake definition to the colour-coded template
|
||||
presented in the previous section, most of it should look familiar.
|
||||
|
||||
|
|
@ -40,12 +40,12 @@ presented in the previous section, most of it should look familiar.
|
|||
}
|
||||
....
|
||||
|
||||
This `flake.nix` doesn’t have a `devShells` section, because development
|
||||
on the current version doesn’t require anything beyond
|
||||
This `flake.nix` doesn't have a `devShells` section, because development
|
||||
on the current version doesn't require anything beyond
|
||||
the "`bare bones`" linux commands. Later we will add a feature that requires
|
||||
additional development tools.
|
||||
|
||||
Now let’s look at the section I labeled `SOME UNFAMILIAR STUFF` and
|
||||
Now let's look at the section I labeled `SOME UNFAMILIAR STUFF` and
|
||||
see what it does.
|
||||
|
||||
[subs=quotes]
|
||||
|
|
@ -71,8 +71,8 @@ see what it does.
|
|||
|
||||
This flake uses `mkDerivation` `❶` which is a very useful
|
||||
general-purpose package builder provided by the Nix standard
|
||||
environment. It’s especially useful for the typical
|
||||
`./configure; make; make install` scenario, but for this flake we don’t
|
||||
environment. It's especially useful for the typical
|
||||
`./configure; make; make install` scenario, but for this flake we don't
|
||||
even need that.
|
||||
|
||||
The `name` variable is the name of the flake, as it would appear in a
|
||||
|
|
@ -85,7 +85,7 @@ unpacked.
|
|||
|
||||
The `buildPhase` variable is a sequence of Linux commands to build the
|
||||
package. Typically, building a package requires compiling the source
|
||||
code. However, that’s not required for a simple shell script. So
|
||||
code. However, that's not required for a simple shell script. So
|
||||
`buildPhase` consists of a single command, `:`,
|
||||
which is a no-op or "`do nothing`" command.
|
||||
|
||||
|
|
@ -102,7 +102,7 @@ install phases, the only commands available are those provided by the
|
|||
Nix standard environment and the external dependencies identified in the
|
||||
`inputs` section of the flake.
|
||||
|
||||
I’ve mentioned the Nix standard environment before, but I didn’t explain
|
||||
I've mentioned the Nix standard environment before, but I didn't explain
|
||||
what it is. The standard environment, or `stdenv`, refers to the
|
||||
functionality that is available during the build and install phases of a
|
||||
Nix package (or flake). It includes the commands listed
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue