mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-06-05 21:03:40 +00:00
Remove optional builtins prefixes from prelude functions by running:
builtins=(
abort
baseNameOf
break
derivation
derivationStrict
dirOf
false
fetchGit
fetchMercurial
fetchTarball
fetchTree
fromTOML
import
isNull
map
null
placeholder
removeAttrs
scopedImport
throw
toString
true
)
fd \
--exclude doc/manual/release-notes \
--type file \
. \
nixos \
--exec-batch sed --in-place --regexp-extended "
s/\<builtins\.($(
printf '%s\n' "${builtins[@]}" |
paste --delimiter '|' --serial -
))\>/\1/g
"
nix fmt
35 lines
775 B
Nix
35 lines
775 B
Nix
{ pkgs, runTest, ... }:
|
|
builtins.listToAttrs (
|
|
map
|
|
(packageName: {
|
|
name = packageName;
|
|
value = runTest {
|
|
name = "nginx-variant-${packageName}";
|
|
|
|
nodes.machine =
|
|
{ pkgs, ... }:
|
|
{
|
|
services.nginx = {
|
|
enable = true;
|
|
virtualHosts.localhost.locations."/".return = "200 'foo'";
|
|
package = pkgs.${packageName};
|
|
};
|
|
};
|
|
|
|
testScript = ''
|
|
machine.wait_for_unit("nginx")
|
|
machine.wait_for_open_port(80)
|
|
machine.succeed('test "$(curl -fvvv http://localhost/)" = foo')
|
|
'';
|
|
};
|
|
})
|
|
[
|
|
"angie"
|
|
"nginxStable"
|
|
"nginxMainline"
|
|
"nginxShibboleth"
|
|
"openresty"
|
|
"tengine"
|
|
]
|
|
)
|