mirror of
https://github.com/NixOS/nix
synced 2025-07-07 01:51:47 +02:00
Format .nix files
This does not include any automation for the release branch, but is based on the configuration of https://github.com/NixOS/nix/pull/12349 pre-commit run -a nixfmt-rfc-style
This commit is contained in:
parent
6cb17fd836
commit
32aed360b8
266 changed files with 7443 additions and 5118 deletions
|
@ -2,28 +2,33 @@ with import ./config.nix;
|
|||
|
||||
rec {
|
||||
|
||||
printRefs =
|
||||
''
|
||||
echo $exportReferencesGraph
|
||||
while read path; do
|
||||
read drv
|
||||
read nrRefs
|
||||
echo "$path has $nrRefs references"
|
||||
echo "$path" >> $out
|
||||
for ((n = 0; n < $nrRefs; n++)); do read ref; echo "ref $ref"; test -e "$ref"; done
|
||||
done < refs
|
||||
'';
|
||||
printRefs = ''
|
||||
echo $exportReferencesGraph
|
||||
while read path; do
|
||||
read drv
|
||||
read nrRefs
|
||||
echo "$path has $nrRefs references"
|
||||
echo "$path" >> $out
|
||||
for ((n = 0; n < $nrRefs; n++)); do read ref; echo "ref $ref"; test -e "$ref"; done
|
||||
done < refs
|
||||
'';
|
||||
|
||||
foo."bar.runtimeGraph" = mkDerivation {
|
||||
name = "dependencies";
|
||||
builder = builtins.toFile "build-graph-builder" "${printRefs}";
|
||||
exportReferencesGraph = ["refs" (import ./dependencies.nix {})];
|
||||
exportReferencesGraph = [
|
||||
"refs"
|
||||
(import ./dependencies.nix { })
|
||||
];
|
||||
};
|
||||
|
||||
foo."bar.buildGraph" = mkDerivation {
|
||||
name = "dependencies";
|
||||
builder = builtins.toFile "build-graph-builder" "${printRefs}";
|
||||
exportReferencesGraph = ["refs" (import ./dependencies.nix {}).drvPath];
|
||||
exportReferencesGraph = [
|
||||
"refs"
|
||||
(import ./dependencies.nix { }).drvPath
|
||||
];
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue