mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-25 23:36:16 +02:00
Merge pull request #10420 from stuebinm/markdown-doc-formatting
fix codeblocks in the repl's `:doc`
This commit is contained in:
commit
2dc06b3969
3 changed files with 10 additions and 0 deletions
|
@ -868,10 +868,13 @@ static RegisterPrimOp r3({
|
||||||
Parse a flake reference, and return its exploded form.
|
Parse a flake reference, and return its exploded form.
|
||||||
|
|
||||||
For example:
|
For example:
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
builtins.parseFlakeRef "github:NixOS/nixpkgs/23.05?dir=lib"
|
builtins.parseFlakeRef "github:NixOS/nixpkgs/23.05?dir=lib"
|
||||||
```
|
```
|
||||||
|
|
||||||
evaluates to:
|
evaluates to:
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
{ dir = "lib"; owner = "NixOS"; ref = "23.05"; repo = "nixpkgs"; type = "github"; }
|
{ dir = "lib"; owner = "NixOS"; ref = "23.05"; repo = "nixpkgs"; type = "github"; }
|
||||||
```
|
```
|
||||||
|
@ -920,12 +923,15 @@ static RegisterPrimOp r4({
|
||||||
Convert a flake reference from attribute set format to URL format.
|
Convert a flake reference from attribute set format to URL format.
|
||||||
|
|
||||||
For example:
|
For example:
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
builtins.flakeRefToString {
|
builtins.flakeRefToString {
|
||||||
dir = "lib"; owner = "NixOS"; ref = "23.05"; repo = "nixpkgs"; type = "github";
|
dir = "lib"; owner = "NixOS"; ref = "23.05"; repo = "nixpkgs"; type = "github";
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
evaluates to
|
evaluates to
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
"github:NixOS/nixpkgs/23.05?dir=lib"
|
"github:NixOS/nixpkgs/23.05?dir=lib"
|
||||||
```
|
```
|
||||||
|
|
|
@ -1915,11 +1915,13 @@ static RegisterPrimOp primop_outputOf({
|
||||||
*`derivation reference`* must be a string that may contain a regular store path to a derivation, or may be a placeholder reference. If the derivation is produced by a derivation, you must explicitly select `drv.outPath`.
|
*`derivation reference`* must be a string that may contain a regular store path to a derivation, or may be a placeholder reference. If the derivation is produced by a derivation, you must explicitly select `drv.outPath`.
|
||||||
This primop can be chained arbitrarily deeply.
|
This primop can be chained arbitrarily deeply.
|
||||||
For instance,
|
For instance,
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
builtins.outputOf
|
builtins.outputOf
|
||||||
(builtins.outputOf myDrv "out")
|
(builtins.outputOf myDrv "out")
|
||||||
"out"
|
"out"
|
||||||
```
|
```
|
||||||
|
|
||||||
will return a placeholder for the output of the output of `myDrv`.
|
will return a placeholder for the output of the output of `myDrv`.
|
||||||
|
|
||||||
This primop corresponds to the `^` sigil for derivable paths, e.g. as part of installable syntax on the command line.
|
This primop corresponds to the `^` sigil for derivable paths, e.g. as part of installable syntax on the command line.
|
||||||
|
|
|
@ -650,12 +650,14 @@ static RegisterPrimOp primop_fetchGit({
|
||||||
|
|
||||||
The public keys against which `rev` is verified if `verifyCommit` is enabled.
|
The public keys against which `rev` is verified if `verifyCommit` is enabled.
|
||||||
Must be given as a list of attribute sets with the following form:
|
Must be given as a list of attribute sets with the following form:
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
{
|
{
|
||||||
key = "<public key>";
|
key = "<public key>";
|
||||||
type = "<key type>"; # optional, default: "ssh-ed25519"
|
type = "<key type>"; # optional, default: "ssh-ed25519"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Requires the [`verified-fetches` experimental feature](@docroot@/contributing/experimental-features.md#xp-feature-verified-fetches).
|
Requires the [`verified-fetches` experimental feature](@docroot@/contributing/experimental-features.md#xp-feature-verified-fetches).
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue