Skip to content

Commit 288b4bd

Browse files
committed
tests: fix locale test on macOS and docs
1 parent 8fdf9b7 commit 288b4bd

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

docs/extending.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,11 @@ possible to extend it.
55

66
## Extra modules
77

8-
All the `devshell.toml` schema options that are prefixed with `extra.<name>`
9-
are only loaded on demand. This is done to keep devshell fast for users that
10-
don't need all the modules.
8+
All the `devshell.toml` schema options that are `Declared in:` the `extra/`
9+
folder in the schema documentation are loaded on demand.
1110

1211
In order to load an extra module, use the `<name>` in the import section. For
13-
example to make the `extra.locale` options available, import `locale`:
12+
example to make the `locale` options available, import `locale`:
1413

1514
`devshell.toml`:
1615
```toml
@@ -19,13 +18,13 @@ imports = ["locale"]
1918

2019
Make sure to add this at the first statement in the file.
2120

22-
Now that the module has been loaded, the `devshell.toml` understands the extra
23-
options:
21+
Now that the module has been loaded, the `devshell.toml` understands the
22+
`locale` prefix:
2423

2524
```toml
26-
imports = ["extra.locale"]
25+
imports = ["locale"]
2726

28-
[extra.locale]
27+
[locale]
2928
lang = "en_US.UTF-8"
3029
```
3130

tests/extra/locale.nix

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@
1616
source ${shell}
1717
1818
# Sets LOCALE_ARCHIVE
19-
assert -n "$LOCALE_ARCHIVE"
19+
if [[ $OSTYPE == linux-gnu ]]; then
20+
assert -n "$LOCALE_ARCHIVE"
21+
else
22+
assert -z "$LOCALE_ARCHIVE"
23+
fi
2024
'';
2125
}

0 commit comments

Comments
 (0)