treewide: nixfmt-rfc-style -> nixfmt
Except: - Instances in documentation, because people in older versions can't switch to nixfmt yet due to it having pointed to nixfmt-classic before - In code that runs based on a CI Nixpkgs version, which is also a bit older still - In update script shebangs, because many of them don't pin Nixpkgs, and run with whatever is in NIX_PATH (and it's not easy to fix this, see https://github.com/NixOS/nixpkgs/issues/425551)
This commit is contained in:
parent
b3bc1e31d0
commit
d1a4769b38
@ -49,7 +49,7 @@ let
|
|||||||
|
|
||||||
programs.keep-sorted.enable = true;
|
programs.keep-sorted.enable = true;
|
||||||
|
|
||||||
# This uses nixfmt-rfc-style underneath,
|
# This uses nixfmt underneath,
|
||||||
# the default formatter for Nix code.
|
# the default formatter for Nix code.
|
||||||
# See https://github.com/NixOS/nixfmt
|
# See https://github.com/NixOS/nixfmt
|
||||||
programs.nixfmt.enable = true;
|
programs.nixfmt.enable = true;
|
||||||
|
@ -9,7 +9,7 @@ let
|
|||||||
stdenvNoCC
|
stdenvNoCC
|
||||||
gitMinimal
|
gitMinimal
|
||||||
treefmt
|
treefmt
|
||||||
nixfmt-rfc-style
|
nixfmt
|
||||||
;
|
;
|
||||||
in
|
in
|
||||||
|
|
||||||
@ -27,7 +27,7 @@ stdenvNoCC.mkDerivation {
|
|||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
gitMinimal
|
gitMinimal
|
||||||
treefmt
|
treefmt
|
||||||
nixfmt-rfc-style
|
nixfmt
|
||||||
];
|
];
|
||||||
patchPhase = ''
|
patchPhase = ''
|
||||||
patchShebangs .
|
patchShebangs .
|
||||||
|
@ -13,7 +13,7 @@ pkgs.mkShell {
|
|||||||
|
|
||||||
packages = [
|
packages = [
|
||||||
pkgs.bash
|
pkgs.bash
|
||||||
pkgs.nixfmt-rfc-style
|
pkgs.nixfmt
|
||||||
];
|
];
|
||||||
|
|
||||||
EMACS2NIX = src;
|
EMACS2NIX = src;
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
lib,
|
lib,
|
||||||
replaceVarsWith,
|
replaceVarsWith,
|
||||||
nuget-to-nix,
|
nuget-to-nix,
|
||||||
nixfmt-rfc-style,
|
nixfmt,
|
||||||
nuget-to-json,
|
nuget-to-json,
|
||||||
cacert,
|
cacert,
|
||||||
fetchNupkg,
|
fetchNupkg,
|
||||||
@ -90,7 +90,7 @@ attrs
|
|||||||
replacements = {
|
replacements = {
|
||||||
binPath = lib.makeBinPath [
|
binPath = lib.makeBinPath [
|
||||||
nuget-to-nix
|
nuget-to-nix
|
||||||
nixfmt-rfc-style
|
nixfmt
|
||||||
nuget-to-json
|
nuget-to-json
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
@ -909,7 +909,7 @@ rec {
|
|||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
buildPackages.perl
|
buildPackages.perl
|
||||||
buildPackages.dpkg
|
buildPackages.dpkg
|
||||||
buildPackages.nixfmt-rfc-style
|
buildPackages.nixfmt
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
''
|
''
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
writeShellScript,
|
writeShellScript,
|
||||||
nix-update,
|
nix-update,
|
||||||
elm2nix,
|
elm2nix,
|
||||||
nixfmt-rfc-style,
|
nixfmt,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildNpmPackage rec {
|
buildNpmPackage rec {
|
||||||
@ -53,7 +53,7 @@ buildNpmPackage rec {
|
|||||||
cp "$(nix-build -A "$UPDATE_NIX_ATTR_PATH".src)/projects/cli/src/codegen/elm.json" elm.json
|
cp "$(nix-build -A "$UPDATE_NIX_ATTR_PATH".src)/projects/cli/src/codegen/elm.json" elm.json
|
||||||
trap 'rm -rf elm.json registry.dat &> /dev/null' EXIT
|
trap 'rm -rf elm.json registry.dat &> /dev/null' EXIT
|
||||||
${lib.getExe elm2nix} convert > pkgs/by-name/el/elm-land/elm-srcs.nix
|
${lib.getExe elm2nix} convert > pkgs/by-name/el/elm-land/elm-srcs.nix
|
||||||
${lib.getExe nixfmt-rfc-style} pkgs/by-name/el/elm-land/elm-srcs.nix
|
${lib.getExe nixfmt} pkgs/by-name/el/elm-land/elm-srcs.nix
|
||||||
${lib.getExe elm2nix} snapshot
|
${lib.getExe elm2nix} snapshot
|
||||||
cp registry.dat pkgs/by-name/el/elm-land/registry.dat
|
cp registry.dat pkgs/by-name/el/elm-land/registry.dat
|
||||||
'';
|
'';
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
nix-prefetch-git,
|
nix-prefetch-git,
|
||||||
nix,
|
nix,
|
||||||
coreutils,
|
coreutils,
|
||||||
nixfmt-rfc-style,
|
nixfmt,
|
||||||
makeWrapper,
|
makeWrapper,
|
||||||
}:
|
}:
|
||||||
# Based on https://github.com/milahu/gclient2nix
|
# Based on https://github.com/milahu/gclient2nix
|
||||||
@ -19,7 +19,7 @@ let
|
|||||||
nix-prefetch-git
|
nix-prefetch-git
|
||||||
nix
|
nix
|
||||||
coreutils
|
coreutils
|
||||||
nixfmt-rfc-style
|
nixfmt
|
||||||
];
|
];
|
||||||
in
|
in
|
||||||
buildPythonPackage {
|
buildPythonPackage {
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
rustPlatform,
|
rustPlatform,
|
||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
nix,
|
nix,
|
||||||
nixfmt-rfc-style,
|
nixfmt,
|
||||||
nix-update-script,
|
nix-update-script,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
@ -25,7 +25,7 @@ rustPlatform.buildRustPackage rec {
|
|||||||
|
|
||||||
env = {
|
env = {
|
||||||
CFG_RELEASE = version;
|
CFG_RELEASE = version;
|
||||||
CFG_DEFAULT_FORMATTER = lib.getExe nixfmt-rfc-style;
|
CFG_DEFAULT_FORMATTER = lib.getExe nixfmt;
|
||||||
};
|
};
|
||||||
|
|
||||||
# might be related to https://github.com/NixOS/nix/issues/5884
|
# might be related to https://github.com/NixOS/nix/issues/5884
|
||||||
|
@ -2,14 +2,14 @@
|
|||||||
lib,
|
lib,
|
||||||
runCommand,
|
runCommand,
|
||||||
treefmt,
|
treefmt,
|
||||||
nixfmt-rfc-style,
|
nixfmt,
|
||||||
nixfmt-tree,
|
nixfmt-tree,
|
||||||
git,
|
git,
|
||||||
writableTmpDirAsHomeHook,
|
writableTmpDirAsHomeHook,
|
||||||
|
|
||||||
settings ? { },
|
settings ? { },
|
||||||
runtimeInputs ? [ ],
|
runtimeInputs ? [ ],
|
||||||
nixfmtPackage ? nixfmt-rfc-style,
|
nixfmtPackage ? nixfmt,
|
||||||
|
|
||||||
# NOTE: `runtimePackages` is deprecated. Use `nixfmtPackage` and/or `runtimeInputs`.
|
# NOTE: `runtimePackages` is deprecated. Use `nixfmtPackage` and/or `runtimeInputs`.
|
||||||
runtimePackages ? [ nixfmtPackage ],
|
runtimePackages ? [ nixfmtPackage ],
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
runCommand,
|
runCommand,
|
||||||
testers,
|
testers,
|
||||||
treefmt,
|
treefmt,
|
||||||
nixfmt-rfc-style,
|
nixfmt,
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
inherit (treefmt) buildConfig withConfig;
|
inherit (treefmt) buildConfig withConfig;
|
||||||
@ -29,7 +29,7 @@ let
|
|||||||
|
|
||||||
nixfmtExamplePackage = withConfig {
|
nixfmtExamplePackage = withConfig {
|
||||||
settings = nixfmtExampleConfig;
|
settings = nixfmtExampleConfig;
|
||||||
runtimeInputs = [ nixfmt-rfc-style ];
|
runtimeInputs = [ nixfmt ];
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
coreutils,
|
coreutils,
|
||||||
git,
|
git,
|
||||||
nix,
|
nix,
|
||||||
nixfmt-rfc-style,
|
nixfmt,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
attrPath:
|
attrPath:
|
||||||
@ -22,7 +22,7 @@ let
|
|||||||
coreutils
|
coreutils
|
||||||
git
|
git
|
||||||
nix
|
nix
|
||||||
nixfmt-rfc-style
|
nixfmt
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
set -o errexit
|
set -o errexit
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
git,
|
git,
|
||||||
gnused,
|
gnused,
|
||||||
nix,
|
nix,
|
||||||
nixfmt-rfc-style,
|
nixfmt,
|
||||||
rebar3-nix,
|
rebar3-nix,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
@ -95,7 +95,7 @@ let
|
|||||||
git
|
git
|
||||||
gnused
|
gnused
|
||||||
nix
|
nix
|
||||||
nixfmt-rfc-style
|
nixfmt
|
||||||
(rebar3WithPlugins { globalPlugins = [ rebar3-nix ]; })
|
(rebar3WithPlugins { globalPlugins = [ rebar3-nix ]; })
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
git,
|
git,
|
||||||
cmake,
|
cmake,
|
||||||
nixosTests,
|
nixosTests,
|
||||||
nixfmt-rfc-style,
|
nixfmt,
|
||||||
mobilizon-frontend,
|
mobilizon-frontend,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
@ -145,7 +145,7 @@ mixRelease rec {
|
|||||||
set -eou pipefail
|
set -eou pipefail
|
||||||
|
|
||||||
${lib.getExe mix2nix} '${src}/mix.lock' > pkgs/servers/mobilizon/mix.nix
|
${lib.getExe mix2nix} '${src}/mix.lock' > pkgs/servers/mobilizon/mix.nix
|
||||||
${lib.getExe nixfmt-rfc-style} pkgs/servers/mobilizon/mix.nix
|
${lib.getExe nixfmt} pkgs/servers/mobilizon/mix.nix
|
||||||
'';
|
'';
|
||||||
elixirPackage = beamPackages.elixir;
|
elixirPackage = beamPackages.elixir;
|
||||||
};
|
};
|
||||||
|
@ -43,7 +43,7 @@
|
|||||||
makeFontsConf,
|
makeFontsConf,
|
||||||
useFixedHashes ? true,
|
useFixedHashes ? true,
|
||||||
recurseIntoAttrs,
|
recurseIntoAttrs,
|
||||||
nixfmt-rfc-style,
|
nixfmt,
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
stdenv = gcc12Stdenv;
|
stdenv = gcc12Stdenv;
|
||||||
@ -151,7 +151,7 @@ let
|
|||||||
tl2nix = ./tl2nix.sed;
|
tl2nix = ./tl2nix.sed;
|
||||||
}
|
}
|
||||||
''
|
''
|
||||||
xzcat "$tlpdbxz" | sed -rn -f "$tl2nix" | uniq | ${lib.getExe nixfmt-rfc-style} > "$out"
|
xzcat "$tlpdbxz" | sed -rn -f "$tl2nix" | uniq | ${lib.getExe nixfmt} > "$out"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# map: name -> fixed-output hash
|
# map: name -> fixed-output hash
|
||||||
|
@ -346,7 +346,7 @@ let
|
|||||||
nix-script
|
nix-script
|
||||||
nix-tree
|
nix-tree
|
||||||
nixfmt-classic
|
nixfmt-classic
|
||||||
nixfmt-rfc-style
|
nixfmt
|
||||||
nota
|
nota
|
||||||
nvfetcher
|
nvfetcher
|
||||||
oama
|
oama
|
||||||
|
Loading…
x
Reference in New Issue
Block a user