mirror of
https://github.com/nix-community/home-manager.git
synced 2025-11-08 11:36:05 +01:00
tests: explicitly define NIX_CONFIG
Ensure NIX_CONFIG is correctly configured for the tests command. It is possible that someone may enable experimental features on an ad-hoc basis, e.g. via the `--extra-experimental-features` CLI flag. In this scenario, the tests script cannot assume they are already enabled. In the future, we may also wish to configure other things, like extra binary substitutors.
This commit is contained in:
parent
7248450206
commit
87044c5722
1 changed files with 8 additions and 0 deletions
|
|
@ -10,6 +10,14 @@ writeShellApplication {
|
|||
python3
|
||||
fzf
|
||||
];
|
||||
runtimeEnv = {
|
||||
# Explicitly enable experimental features, in case someone runs e.g.
|
||||
# nix run .#tests --extra-experimental-features 'nix-command flakes'
|
||||
# without enabling them globally.
|
||||
NIX_CONFIG = ''
|
||||
experimental-features = nix-command flakes
|
||||
'';
|
||||
};
|
||||
text = ''
|
||||
exec python3 ${flake}/tests/tests.py "$@"
|
||||
'';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue