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 b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
This commit is contained in:
Silvan Mosberger
2024-12-10 20:26:33 +01:00
parent b32a094368
commit 4f0dadbf38
21293 changed files with 701276 additions and 428232 deletions
+9 -6
View File
@@ -1,7 +1,10 @@
{ callPackage, ... } @ args:
{ callPackage, ... }@args:
callPackage ./generic.nix (args // {
version = "0.3.3";
sha256 = "0g5df00cj4nczrmr4k791l7la0sq2wnf8rn981fsrz1f3d2yix4i";
patches = [ ./drop-comments.patch ]; # we would get into a cycle when using fetchpatch on this one
})
callPackage ./generic.nix (
args
// {
version = "0.3.3";
sha256 = "0g5df00cj4nczrmr4k791l7la0sq2wnf8rn981fsrz1f3d2yix4i";
patches = [ ./drop-comments.patch ]; # we would get into a cycle when using fetchpatch on this one
}
)
+11 -8
View File
@@ -1,9 +1,12 @@
{ callPackage, python3, ... } @ args:
{ callPackage, python3, ... }@args:
callPackage ./generic.nix (args // {
version = "0.4.2";
sha256 = "sha256-iHWwll/jPeYriQ9s15O+f6/kGk5VLtv2QfH+1eu/Re0=";
# for gitdiff
extraBuildInputs = [ python3 ];
patches = [ ./Revert-Fix-grepdiff-test.patch ];
})
callPackage ./generic.nix (
args
// {
version = "0.4.2";
sha256 = "sha256-iHWwll/jPeYriQ9s15O+f6/kGk5VLtv2QfH+1eu/Re0=";
# for gitdiff
extraBuildInputs = [ python3 ];
patches = [ ./Revert-Fix-grepdiff-test.patch ];
}
)
+8 -5
View File
@@ -1,6 +1,9 @@
{ callPackage, ... } @ args:
{ callPackage, ... }@args:
callPackage ./generic.nix (args // {
version = "0.3.4";
sha256 = "0xp8mcfyi5nmb5a2zi5ibmyshxkb1zv1dgmnyn413m7ahgdx8mfg";
})
callPackage ./generic.nix (
args
// {
version = "0.3.4";
sha256 = "0xp8mcfyi5nmb5a2zi5ibmyshxkb1zv1dgmnyn413m7ahgdx8mfg";
}
)
+20 -10
View File
@@ -1,6 +1,14 @@
{ lib, stdenv, fetchurl, perl, makeWrapper
, version, sha256, patches ? [], extraBuildInputs ? []
, ...
{
lib,
stdenv,
fetchurl,
perl,
makeWrapper,
version,
sha256,
patches ? [ ],
extraBuildInputs ? [ ],
...
}:
stdenv.mkDerivation rec {
pname = "patchutils";
@@ -27,13 +35,15 @@ stdenv.mkDerivation rec {
doCheck = lib.versionAtLeast version "0.3.4";
preCheck = ''
patchShebangs tests
chmod +x scripts/*
'' + lib.optionalString (lib.versionOlder version "0.4.2") ''
find tests -type f -name 'run-test' \
-exec sed -i '{}' -e 's|/bin/echo|echo|g' \;
'';
preCheck =
''
patchShebangs tests
chmod +x scripts/*
''
+ lib.optionalString (lib.versionOlder version "0.4.2") ''
find tests -type f -name 'run-test' \
-exec sed -i '{}' -e 's|/bin/echo|echo|g' \;
'';
meta = with lib; {
description = "Tools to manipulate patch files";