Skip to content

Commit

Permalink
fixup! Support "note" sections, fix inter-links
Browse files Browse the repository at this point in the history
  • Loading branch information
jtojnar committed Apr 7, 2024
1 parent 474bfb7 commit 5107f58
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pills/02-install-on-your-running-system.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The first thing to note: derivations in the Nix store refer to other derivations

<div class="info">

Note: In a multi-user installation, such as the one used in NixOS, the store is owned by root and multiple users can install and build software through a Nix daemon. You can read more about multi-user installations here: <a href="https://nixos.org/manual/nix/stable/installation/installing-binary.html#multi-user-installation">https://nixos.org/manual/nix/stable/installation/installing-binary.html#multi-user-installation</a>.
Note: In a multi-user installation, such as the one used in NixOS, the store is owned by root and multiple users can install and build software through a Nix daemon. You can read more about multi-user installations here: <https://nixos.org/manual/nix/stable/installation/installing-binary.html#multi-user-installation>.

</div>

Expand Down
4 changes: 4 additions & 0 deletions pills/04-basics-of-language.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,15 @@ The syntax of Nix is quite unfamiliar, so looking at existing examples may lead
On the other hand, the same syntax is great for describing packages, so learning the language itself will pay off when writing package expressions.

<div class="info">

Important: In Nix, everything is an expression, there are no statements. This is common in functional languages.

</div>

<div class="info">

Important: Values in Nix are immutable.

</div>

## Value types
Expand Down
2 changes: 2 additions & 0 deletions pills/06-our-first-derivation.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ Both drv paths and out paths are stored in the nix store as you can see.
What's in that `.drv` file? You can read it, but it's better to pretty print it:

<div class="info">

Note: If your version of nix doesn't have `nix derivation show`, use `nix show-derivation` instead.

</div>

```console
Expand Down
4 changes: 3 additions & 1 deletion pills/20-basic-dependencies-and-hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ Welcome to the 20th Nix pill. In the previous [19th](19-fundamentals-of-stdenv.m
This time, we'll focus on the interaction of packages built with `stdenv.mkDerivation`. Packages need to depend on each other, of course. For this we have `buildInputs` and `propagatedBuildInputs` attributes. We've also found that dependencies sometimes need to influence their dependents in ways the dependents can't or shouldn't predict. For this we have setup hooks and env hooks. Together, these 4 concepts support almost all build-time package interactions.

<div class="info">
Note: The complexity of the dependencies and hooks infrastructure has increased, over time, to support cross compilation. Once you learn the core concepts, you will be able to understand the extra complexity. As a starting point, you might want to refer to nixpkgs commit <a href="https://github.com/nixos/nixpkgs/tree/6675f0a52c0962042a1000c7f20e887d0d26ae25">6675f0a5</a>, the last version of stdenv without cross-compilation complexity.

Note: The complexity of the dependencies and hooks infrastructure has increased, over time, to support cross compilation. Once you learn the core concepts, you will be able to understand the extra complexity. As a starting point, you might want to refer to nixpkgs commit [6675f0a5](https://github.com/nixos/nixpkgs/tree/6675f0a52c0962042a1000c7f20e887d0d26ae25), the last version of stdenv without cross-compilation complexity.

</div>

## The `buildInputs` Attribute
Expand Down

0 comments on commit 5107f58

Please sign in to comment.