mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-25 10:36:36 +03:00
treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.
Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.
A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.
This commit was automatically created and can be verified using
nix-build https://github.com/infinisil/treewide-nixpkgs-reformat-script/archive/a08b3a4d199c6124ac5b36a889d9099b4383463f.tar.gz \
--argstr baseRev 0128fbb0a5
result/bin/apply-formatting $NIXPKGS_PATH
This commit is contained in:
parent
0128fbb0a5
commit
d9d87c5196
21586 changed files with 712147 additions and 434007 deletions
|
@ -1,4 +1,8 @@
|
|||
{ nixosLib, pkgsModule, runCommand }:
|
||||
{
|
||||
nixosLib,
|
||||
pkgsModule,
|
||||
runCommand,
|
||||
}:
|
||||
|
||||
let
|
||||
sys = nixosLib.evalModules rec {
|
||||
|
@ -7,13 +11,16 @@ let
|
|||
../documentation.nix
|
||||
../version.nix
|
||||
|
||||
({ lib, someArg, ... }: {
|
||||
# Make sure imports from specialArgs are respected
|
||||
imports = [ someArg.myModule ];
|
||||
(
|
||||
{ lib, someArg, ... }:
|
||||
{
|
||||
# Make sure imports from specialArgs are respected
|
||||
imports = [ someArg.myModule ];
|
||||
|
||||
# TODO test this
|
||||
meta.doc = ./test-dummy.chapter.xml;
|
||||
})
|
||||
# TODO test this
|
||||
meta.doc = ./test-dummy.chapter.xml;
|
||||
}
|
||||
)
|
||||
|
||||
{
|
||||
_module.args = {
|
||||
|
@ -27,23 +34,26 @@ let
|
|||
documentation.nixos.includeAllModules = true;
|
||||
}
|
||||
];
|
||||
specialArgs.someArg.myModule = { lib, ... }: {
|
||||
options.foobar = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "The foobar option was added via specialArgs";
|
||||
default = "qux";
|
||||
specialArgs.someArg.myModule =
|
||||
{ lib, ... }:
|
||||
{
|
||||
options.foobar = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "The foobar option was added via specialArgs";
|
||||
default = "qux";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
in
|
||||
runCommand "documentation-check"
|
||||
{
|
||||
inherit (sys.config.system.build.manual) optionsJSON;
|
||||
} ''
|
||||
json="$optionsJSON/share/doc/nixos/options.json"
|
||||
echo checking $json
|
||||
{
|
||||
inherit (sys.config.system.build.manual) optionsJSON;
|
||||
}
|
||||
''
|
||||
json="$optionsJSON/share/doc/nixos/options.json"
|
||||
echo checking $json
|
||||
|
||||
grep 'The foobar option was added via specialArgs' <"$json" >/dev/null
|
||||
touch $out
|
||||
''
|
||||
grep 'The foobar option was added via specialArgs' <"$json" >/dev/null
|
||||
touch $out
|
||||
''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue