doc: update Nix code snippets format
Command: `mdcr --config doc/tests/mdcr-config.toml doc/`
This commit is contained in:
committed by
Valentin Gagarin
parent
5d979e79ce
commit
bcea0cf344
@@ -4,7 +4,11 @@
|
||||
This hook starts a PostgreSQL server during the `checkPhase`. Example:
|
||||
|
||||
```nix
|
||||
{ stdenv, postgresql, postgresqlTestHook }:
|
||||
{
|
||||
stdenv,
|
||||
postgresql,
|
||||
postgresqlTestHook,
|
||||
}:
|
||||
stdenv.mkDerivation {
|
||||
|
||||
# ...
|
||||
@@ -18,13 +22,13 @@ stdenv.mkDerivation {
|
||||
|
||||
If you use a custom `checkPhase`, remember to add the `runHook` calls:
|
||||
```nix
|
||||
checkPhase ''
|
||||
runHook preCheck
|
||||
checkPhase ''
|
||||
runHook preCheck
|
||||
|
||||
# ... your tests
|
||||
# ... your tests
|
||||
|
||||
runHook postCheck
|
||||
''
|
||||
runHook postCheck
|
||||
''
|
||||
```
|
||||
|
||||
## Variables {#sec-postgresqlTestHook-variables}
|
||||
|
||||
Reference in New Issue
Block a user