mirror of
https://github.com/NixOS/nix.git
synced 2025-11-16 23:42:43 +01: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
566b33b0bd
commit
24c78e06cf
266 changed files with 7809 additions and 5401 deletions
|
|
@ -2,28 +2,33 @@ with import "${builtins.getEnv "_NIX_TEST_BUILD_DIR"}/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