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;
|
||||
|
||||
# This uses nixfmt-rfc-style underneath,
|
||||
# This uses nixfmt underneath,
|
||||
# the default formatter for Nix code.
|
||||
# See https://github.com/NixOS/nixfmt
|
||||
programs.nixfmt.enable = true;
|
||||
|
@ -9,7 +9,7 @@ let
|
||||
stdenvNoCC
|
||||
gitMinimal
|
||||
treefmt
|
||||
nixfmt-rfc-style
|
||||
nixfmt
|
||||
;
|
||||
in
|
||||
|
||||
@ -27,7 +27,7 @@ stdenvNoCC.mkDerivation {
|
||||
nativeBuildInputs = [
|
||||
gitMinimal
|
||||
treefmt
|
||||
nixfmt-rfc-style
|
||||
nixfmt
|
||||
];
|
||||
patchPhase = ''
|
||||
patchShebangs .
|
||||
|
@ -13,7 +13,7 @@ pkgs.mkShell {
|
||||
|
||||
packages = [
|
||||
pkgs.bash
|
||||
pkgs.nixfmt-rfc-style
|
||||
pkgs.nixfmt
|
||||
];
|
||||
|
||||
EMACS2NIX = src;
|
||||
|
@ -5,7 +5,7 @@
|
||||
lib,
|
||||
replaceVarsWith,
|
||||
nuget-to-nix,
|
||||
nixfmt-rfc-style,
|
||||
nixfmt,
|
||||
nuget-to-json,
|
||||
cacert,
|
||||
fetchNupkg,
|
||||
@ -90,7 +90,7 @@ attrs
|
||||
replacements = {
|
||||
binPath = lib.makeBinPath [
|
||||
nuget-to-nix
|
||||
nixfmt-rfc-style
|
||||
nixfmt
|
||||
nuget-to-json
|
||||
];
|
||||
};
|
||||
|
@ -909,7 +909,7 @@ rec {
|
||||
nativeBuildInputs = [
|
||||
buildPackages.perl
|
||||
buildPackages.dpkg
|
||||
buildPackages.nixfmt-rfc-style
|
||||
buildPackages.nixfmt
|
||||
];
|
||||
}
|
||||
''
|
||||
|
@ -7,7 +7,7 @@
|
||||
writeShellScript,
|
||||
nix-update,
|
||||
elm2nix,
|
||||
nixfmt-rfc-style,
|
||||
nixfmt,
|
||||
}:
|
||||
|
||||
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
|
||||
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 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
|
||||
cp registry.dat pkgs/by-name/el/elm-land/registry.dat
|
||||
'';
|
||||
|
@ -8,7 +8,7 @@
|
||||
nix-prefetch-git,
|
||||
nix,
|
||||
coreutils,
|
||||
nixfmt-rfc-style,
|
||||
nixfmt,
|
||||
makeWrapper,
|
||||
}:
|
||||
# Based on https://github.com/milahu/gclient2nix
|
||||
@ -19,7 +19,7 @@ let
|
||||
nix-prefetch-git
|
||||
nix
|
||||
coreutils
|
||||
nixfmt-rfc-style
|
||||
nixfmt
|
||||
];
|
||||
in
|
||||
buildPythonPackage {
|
||||
|
@ -3,7 +3,7 @@
|
||||
rustPlatform,
|
||||
fetchFromGitHub,
|
||||
nix,
|
||||
nixfmt-rfc-style,
|
||||
nixfmt,
|
||||
nix-update-script,
|
||||
}:
|
||||
|
||||
@ -25,7 +25,7 @@ rustPlatform.buildRustPackage rec {
|
||||
|
||||
env = {
|
||||
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
|
||||
|
@ -2,14 +2,14 @@
|
||||
lib,
|
||||
runCommand,
|
||||
treefmt,
|
||||
nixfmt-rfc-style,
|
||||
nixfmt,
|
||||
nixfmt-tree,
|
||||
git,
|
||||
writableTmpDirAsHomeHook,
|
||||
|
||||
settings ? { },
|
||||
runtimeInputs ? [ ],
|
||||
nixfmtPackage ? nixfmt-rfc-style,
|
||||
nixfmtPackage ? nixfmt,
|
||||
|
||||
# NOTE: `runtimePackages` is deprecated. Use `nixfmtPackage` and/or `runtimeInputs`.
|
||||
runtimePackages ? [ nixfmtPackage ],
|
||||
|
@ -3,7 +3,7 @@
|
||||
runCommand,
|
||||
testers,
|
||||
treefmt,
|
||||
nixfmt-rfc-style,
|
||||
nixfmt,
|
||||
}:
|
||||
let
|
||||
inherit (treefmt) buildConfig withConfig;
|
||||
@ -29,7 +29,7 @@ let
|
||||
|
||||
nixfmtExamplePackage = withConfig {
|
||||
settings = nixfmtExampleConfig;
|
||||
runtimeInputs = [ nixfmt-rfc-style ];
|
||||
runtimeInputs = [ nixfmt ];
|
||||
};
|
||||
in
|
||||
{
|
||||
|
@ -7,7 +7,7 @@
|
||||
coreutils,
|
||||
git,
|
||||
nix,
|
||||
nixfmt-rfc-style,
|
||||
nixfmt,
|
||||
}:
|
||||
|
||||
attrPath:
|
||||
@ -22,7 +22,7 @@ let
|
||||
coreutils
|
||||
git
|
||||
nix
|
||||
nixfmt-rfc-style
|
||||
nixfmt
|
||||
]
|
||||
}
|
||||
set -o errexit
|
||||
|
@ -12,7 +12,7 @@
|
||||
git,
|
||||
gnused,
|
||||
nix,
|
||||
nixfmt-rfc-style,
|
||||
nixfmt,
|
||||
rebar3-nix,
|
||||
}:
|
||||
|
||||
@ -95,7 +95,7 @@ let
|
||||
git
|
||||
gnused
|
||||
nix
|
||||
nixfmt-rfc-style
|
||||
nixfmt
|
||||
(rebar3WithPlugins { globalPlugins = [ rebar3-nix ]; })
|
||||
]
|
||||
}
|
||||
|
@ -8,7 +8,7 @@
|
||||
git,
|
||||
cmake,
|
||||
nixosTests,
|
||||
nixfmt-rfc-style,
|
||||
nixfmt,
|
||||
mobilizon-frontend,
|
||||
...
|
||||
}:
|
||||
@ -145,7 +145,7 @@ mixRelease rec {
|
||||
set -eou pipefail
|
||||
|
||||
${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;
|
||||
};
|
||||
|
@ -43,7 +43,7 @@
|
||||
makeFontsConf,
|
||||
useFixedHashes ? true,
|
||||
recurseIntoAttrs,
|
||||
nixfmt-rfc-style,
|
||||
nixfmt,
|
||||
}:
|
||||
let
|
||||
stdenv = gcc12Stdenv;
|
||||
@ -151,7 +151,7 @@ let
|
||||
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
|
||||
|
@ -346,7 +346,7 @@ let
|
||||
nix-script
|
||||
nix-tree
|
||||
nixfmt-classic
|
||||
nixfmt-rfc-style
|
||||
nixfmt
|
||||
nota
|
||||
nvfetcher
|
||||
oama
|
||||
|
Loading…
x
Reference in New Issue
Block a user