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
@@ -1,4 +1,9 @@
{ stdenv, lib, fetchurl, fetchFromGitHub }:
{
stdenv,
lib,
fetchurl,
fetchFromGitHub,
}:
let
version = "0.75";
@@ -15,7 +20,8 @@ let
sha256 = "1y0ivviy58i0pmavhvrpznc4yjigjknff298gnw9rkg5wxm0gbbq";
};
in stdenv.mkDerivation {
in
stdenv.mkDerivation {
pname = "cdb";
inherit version;
@@ -24,7 +30,11 @@ in stdenv.mkDerivation {
inherit sha256;
};
outputs = [ "bin" "doc" "out" ];
outputs = [
"bin"
"doc"
"out"
];
postPatch = ''
# A little patch, borrowed from Archlinux AUR, borrowed from Gentoo Portage
@@ -1,8 +1,9 @@
{ fetchFromGitHub
, lib
, openssl
, pkg-config
, rustPlatform
{
fetchFromGitHub,
lib,
openssl,
pkg-config,
rustPlatform,
}:
rustPlatform.buildRustPackage rec {
@@ -1,9 +1,10 @@
{ stdenv
, fetchFromGitHub
, lib
, rustPlatform
, rustfmt
, protobuf
{
stdenv,
fetchFromGitHub,
lib,
rustPlatform,
rustfmt,
protobuf,
}:
let
src = fetchFromGitHub {
@@ -33,7 +34,10 @@ in
PROTOC = "${protobuf}/bin/protoc";
nativeBuildInputs = [ rustfmt rustPlatform.bindgenHook ];
nativeBuildInputs = [
rustfmt
rustPlatform.bindgenHook
];
# test rely on libindradb and it can't be found
# failure at https://github.com/indradb/indradb/blob/master/server/tests/plugins.rs#L63
@@ -49,7 +53,10 @@ in
PROTOC = "${protobuf}/bin/protoc";
nativeBuildInputs = [ rustfmt rustPlatform.bindgenHook ];
nativeBuildInputs = [
rustfmt
rustPlatform.bindgenHook
];
buildAndTestSubdir = "client";
};
@@ -1,4 +1,8 @@
{ lib, bundlerApp, bundlerUpdateScript }:
{
lib,
bundlerApp,
bundlerUpdateScript,
}:
bundlerApp rec {
gemdir = ./.;
@@ -9,8 +13,8 @@ bundlerApp rec {
meta = with lib; {
description = "Sync data from one Postgres database to another (like `pg_dump`/`pg_restore`)";
homepage = "https://github.com/ankane/pgsync";
license = with licenses; mit;
homepage = "https://github.com/ankane/pgsync";
license = with licenses; mit;
maintainers = with maintainers; [ fabianhjr ];
};
}
@@ -1,61 +1,66 @@
{
parallel = {
groups = ["default"];
platforms = [];
groups = [ "default" ];
platforms = [ ];
source = {
remotes = ["https://rubygems.org"];
remotes = [ "https://rubygems.org" ];
sha256 = "07vnk6bb54k4yc06xnwck7php50l09vvlw1ga8wdz0pia461zpzb";
type = "gem";
};
version = "1.22.1";
};
pg = {
groups = ["default"];
platforms = [];
groups = [ "default" ];
platforms = [ ];
source = {
remotes = ["https://rubygems.org"];
remotes = [ "https://rubygems.org" ];
sha256 = "07m6lxljabw9kyww5k5lgsxsznsm1v5l14r1la09gqka9b5kv3yr";
type = "gem";
};
version = "1.4.6";
};
pgsync = {
dependencies = ["parallel" "pg" "slop" "tty-spinner"];
groups = ["default"];
platforms = [];
dependencies = [
"parallel"
"pg"
"slop"
"tty-spinner"
];
groups = [ "default" ];
platforms = [ ];
source = {
remotes = ["https://rubygems.org"];
remotes = [ "https://rubygems.org" ];
sha256 = "1f2lzsa7l88skp18f8w1ch9w8a42pymc48rdaqjrrdgg0126kvj3";
type = "gem";
};
version = "0.7.4";
};
slop = {
groups = ["default"];
platforms = [];
groups = [ "default" ];
platforms = [ ];
source = {
remotes = ["https://rubygems.org"];
remotes = [ "https://rubygems.org" ];
sha256 = "1iyrjskgxyn8i1679qwkzns85p909aq77cgx2m4fs5ygzysj4hw4";
type = "gem";
};
version = "4.10.1";
};
tty-cursor = {
groups = ["default"];
platforms = [];
groups = [ "default" ];
platforms = [ ];
source = {
remotes = ["https://rubygems.org"];
remotes = [ "https://rubygems.org" ];
sha256 = "0j5zw041jgkmn605ya1zc151bxgxl6v192v2i26qhxx7ws2l2lvr";
type = "gem";
};
version = "0.7.1";
};
tty-spinner = {
dependencies = ["tty-cursor"];
groups = ["default"];
platforms = [];
dependencies = [ "tty-cursor" ];
groups = [ "default" ];
platforms = [ ];
source = {
remotes = ["https://rubygems.org"];
remotes = [ "https://rubygems.org" ];
sha256 = "0hh5awmijnzw9flmh5ak610x1d00xiqagxa5mbr63ysggc26y0qf";
type = "gem";
};
@@ -1,10 +1,11 @@
{ fetchFromGitHub
, lib
, openssl
, pkg-config
, protobuf
, rustPlatform
, stdenv
{
fetchFromGitHub,
lib,
openssl,
pkg-config,
protobuf,
rustPlatform,
stdenv,
}:
# Updating this package will force an update for prisma. The
@@ -48,10 +49,14 @@ rustPlatform.buildRustPackage rec {
'';
cargoBuildFlags = [
"-p" "query-engine"
"-p" "query-engine-node-api"
"-p" "schema-engine-cli"
"-p" "prisma-fmt"
"-p"
"query-engine"
"-p"
"query-engine-node-api"
"-p"
"schema-engine-cli"
"-p"
"prisma-fmt"
];
postInstall = ''
@@ -67,7 +72,11 @@ rustPlatform.buildRustPackage rec {
license = licenses.asl20;
platforms = platforms.unix;
mainProgram = "prisma";
maintainers = with maintainers; [ pimeys tomhoule aqrln ];
maintainers = with maintainers; [
pimeys
tomhoule
aqrln
];
};
}
@@ -1,11 +1,12 @@
{ lib
, stdenv
, rustPlatform
, fetchFromGitHub
, pkg-config
, openssl
, Security
, SystemConfiguration
{
lib,
stdenv,
rustPlatform,
fetchFromGitHub,
pkg-config,
openssl,
Security,
SystemConfiguration,
}:
rustPlatform.buildRustPackage rec {
@@ -32,7 +33,12 @@ rustPlatform.buildRustPackage rec {
nativeBuildInputs = [ pkg-config ];
buildInputs = [ openssl ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security SystemConfiguration ];
buildInputs =
[ openssl ]
++ lib.optionals stdenv.hostPlatform.isDarwin [
Security
SystemConfiguration
];
cargoBuildFlags = [ "--all-features" ];
@@ -1,5 +1,13 @@
{ lib, stdenv, fetchFromGitHub, cmake
, qtbase, qttools, sqlcipher, wrapQtAppsHook, qtmacextras
{
lib,
stdenv,
fetchFromGitHub,
cmake,
qtbase,
qttools,
sqlcipher,
wrapQtAppsHook,
qtmacextras,
}:
stdenv.mkDerivation (finalAttrs: {
@@ -19,9 +27,16 @@ stdenv.mkDerivation (finalAttrs: {
# but qscintilla is currently in a bit of a mess as some consumers expect a
# -qt4 or -qt5 prefix while others do not.
# We *really* should get that cleaned up.
buildInputs = [ qtbase sqlcipher ] ++ lib.optional stdenv.hostPlatform.isDarwin qtmacextras;
buildInputs = [
qtbase
sqlcipher
] ++ lib.optional stdenv.hostPlatform.isDarwin qtmacextras;
nativeBuildInputs = [ cmake qttools wrapQtAppsHook ];
nativeBuildInputs = [
cmake
qttools
wrapQtAppsHook
];
cmakeFlags = [
"-Dsqlcipher=1"
@@ -1,8 +1,14 @@
# To enable specific database drivers, override this derivation and pass the
# driver packages in the drivers argument (e.g. mysql_jdbc, postgresql_jdbc).
{ lib, stdenv, fetchurl, makeDesktopItem, makeWrapper, unzip
, jre
, drivers ? []
{
lib,
stdenv,
fetchurl,
makeDesktopItem,
makeWrapper,
unzip,
jre,
drivers ? [ ],
}:
stdenv.mkDerivation rec {
pname = "squirrel-sql";
@@ -13,7 +19,10 @@ stdenv.mkDerivation rec {
sha256 = "sha256-uQuzh9CyGNJsbYvQiQAYmIyBgpIzXALg8dTFB1USkr0=";
};
nativeBuildInputs = [ makeWrapper unzip ];
nativeBuildInputs = [
makeWrapper
unzip
];
buildInputs = [ jre ];
unpackPhase = ''
@@ -1,11 +1,12 @@
{ lib
, stdenv
, rustPlatform
, fetchFromGitHub
, testers
, Security
, surrealdb-migrations
, nix-update-script
{
lib,
stdenv,
rustPlatform,
fetchFromGitHub,
testers,
Security,
surrealdb-migrations,
nix-update-script,
}:
let
@@ -24,28 +25,27 @@ rustPlatform.buildRustPackage rec {
cargoHash = "sha256-ELYBEQrh80LdNYNZwcGVh9GE+dSfjF+RuO8fd0PabIw=";
buildInputs = [ ]
++ lib.optionals stdenv.hostPlatform.isDarwin [ Security ];
buildInputs = [ ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security ];
# Error: No such file or directory (os error 2)
# failures:
# cli::apply::apply_initial_migrations
# cli::apply::apply_initial_schema_changes
# cli::apply::apply_new_migrations
# cli::apply::apply_new_schema_changes
# cli::apply::apply_should_skip_events_if_no_events_folder
# cli::apply::apply_with_db_configuration
# cli::apply::apply_with_skipped_migrations
# cli::list::list_blog_migrations
# cli::list::list_empty_migrations
# library::list::list_blog_migrations
# library::list::list_empty_migrations
# library::up::apply_initial_migrations
# library::up::apply_initial_schema_changes
# library::up::apply_new_migrations
# library::up::apply_new_schema_changes
# library::up::apply_should_skip_events_if_no_events_folder
# library::up_to::apply_with_skipped_migrations
# Error: No such file or directory (os error 2)
# failures:
# cli::apply::apply_initial_migrations
# cli::apply::apply_initial_schema_changes
# cli::apply::apply_new_migrations
# cli::apply::apply_new_schema_changes
# cli::apply::apply_should_skip_events_if_no_events_folder
# cli::apply::apply_with_db_configuration
# cli::apply::apply_with_skipped_migrations
# cli::list::list_blog_migrations
# cli::list::list_empty_migrations
# library::list::list_blog_migrations
# library::list::list_empty_migrations
# library::up::apply_initial_migrations
# library::up::apply_initial_schema_changes
# library::up::apply_new_migrations
# library::up::apply_new_schema_changes
# library::up::apply_should_skip_events_if_no_events_folder
# library::up_to::apply_with_skipped_migrations
doCheck = false;
passthru = {