@@ -5,7 +5,7 @@ support for importing Dhall expressions, which is documented here:
5
5
6
6
* [ ` dhall-lang.org ` - Installing packages] ( https://docs.dhall-lang.org/tutorials/Language-Tour.html#installing-packages )
7
7
8
- ## Remote imports
8
+ ## Remote imports {#ssec-dhall-remote-imports}
9
9
10
10
Nixpkgs bypasses Dhall's support for remote imports using Dhall's
11
11
semantic integrity checks. Specifically, any Dhall import can be protected by
@@ -32,7 +32,7 @@ example, the Prelude Dhall package uses `pkgs.fetchFromGitHub` to fetch the
32
32
to fetch Dhall code ensures that Dhall packages built using Nix remain pure and
33
33
also behave well when built within a sandbox.
34
34
35
- ## Packaging a Dhall expression from scratch
35
+ ## Packaging a Dhall expression from scratch {#ssec-dhall-packaging-expression}
36
36
37
37
We can illustrate how Nixpkgs integrates Dhall by beginning from the following
38
38
trivial Dhall expression with one dependency (the Prelude):
117
117
$ nix build --file ./example.nix dhallPackages.true
118
118
```
119
119
120
- ## Contents of a Dhall package
120
+ ## Contents of a Dhall package {#ssec-dhall-package-contents}
121
121
122
122
The above package produces the following directory tree:
123
123
@@ -224,7 +224,7 @@ $ cat ./result/source.dhall
224
224
…
225
225
` ` `
226
226
227
- # # Packaging functions
227
+ # # Packaging functions {#ssec-dhall-packaging-functions}
228
228
229
229
We already saw an example of using ` buildDhallPackage` to create a Dhall
230
230
package from a single file, but most Dhall packages consist of more than one
@@ -297,7 +297,7 @@ terms of `buildDhallPackage` that accepts the following arguments:
297
297
Additionally, `buildDhallGitHubPackage` accepts the same arguments as
298
298
`fetchFromGitHub`, such as `sha256` or `fetchSubmodules`.
299
299
300
- ## `dhall-to-nixpkgs`
300
+ ## `dhall-to-nixpkgs` {#ssec-dhall-dhall-to-nixpkgs}
301
301
302
302
You can use the `dhall-to-nixpkgs` command-line utility to automate
303
303
packaging Dhall code. For example:
@@ -342,7 +342,7 @@ $ dhall-to-nixpkgs directory ~/proj/dhall-semver
342
342
}
343
343
```
344
344
345
- ## Overriding dependency versions
345
+ ## Overriding dependency versions {#ssec-dhall-overriding-dependency-versions}
346
346
347
347
Suppose that we change our `true.dhall` example expression to depend on an older
348
348
version of the Prelude (19.0.0):
@@ -415,7 +415,7 @@ like this:
415
415
};
416
416
` ` `
417
417
418
- # # Overrides
418
+ # # Overrides {#ssec-dhall-overrides}
419
419
420
420
You can override any of the arguments to ` buildDhallGitHubPackage` or
421
421
` buildDhallDirectoryPackage` using the ` overridePackage` attribute of a package.
0 commit comments