From af69be669f0257e734c3fb97828910f69fcb45a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Janne=20He=C3=9F?= Date: Tue, 2 Apr 2024 20:47:13 +0200 Subject: [PATCH] treewide: Rename nixfmt to nixfmt-classic (#300468) * treewide: Rename nixfmt to nixfmt-classic * Update pkgs/top-level/aliases.nix Co-authored-by: Silvan Mosberger --------- Co-authored-by: Silvan Mosberger --- pkgs/applications/editors/nano/default.nix | 4 ++-- pkgs/applications/networking/browsers/chromium/update.py | 2 +- pkgs/applications/terminal-emulators/xterm/default.nix | 2 +- pkgs/development/compilers/scala/2.x.nix | 4 ++-- pkgs/development/tools/ammonite/default.nix | 4 ++-- pkgs/development/tools/build-managers/sbt-extras/default.nix | 4 ++-- .../tools/continuous-integration/jenkins/default.nix | 4 ++-- pkgs/shells/zsh/oh-my-zsh/default.nix | 4 ++-- pkgs/top-level/aliases.nix | 1 + pkgs/top-level/all-packages.nix | 2 +- 10 files changed, 16 insertions(+), 15 deletions(-) diff --git a/pkgs/applications/editors/nano/default.nix b/pkgs/applications/editors/nano/default.nix index a8e24956fda8..7221e0a6c517 100644 --- a/pkgs/applications/editors/nano/default.nix +++ b/pkgs/applications/editors/nano/default.nix @@ -1,5 +1,5 @@ { lib, stdenv, fetchurl, fetchFromGitHub, ncurses, texinfo, writeScript -, common-updater-scripts, git, nix, nixfmt, coreutils, gnused, callPackage +, common-updater-scripts, git, nix, nixfmt-classic, coreutils, gnused, callPackage , file ? null, gettext ? null, enableNls ? true, enableTiny ? false }: assert enableNls -> (gettext != null); @@ -48,7 +48,7 @@ in stdenv.mkDerivation rec { lib.makeBinPath [ common-updater-scripts git - nixfmt + nixfmt-classic nix coreutils gnused diff --git a/pkgs/applications/networking/browsers/chromium/update.py b/pkgs/applications/networking/browsers/chromium/update.py index c1d893e0cff9..29a46cd688c6 100755 --- a/pkgs/applications/networking/browsers/chromium/update.py +++ b/pkgs/applications/networking/browsers/chromium/update.py @@ -1,5 +1,5 @@ #! /usr/bin/env nix-shell -#! nix-shell -i python -p python3 nix nixfmt nix-prefetch-git +#! nix-shell -i python -p python3 nix nixfmt-classic nix-prefetch-git """This script automatically updates chromium, google-chrome, chromedriver, and ungoogled-chromium via upstream-info.nix.""" diff --git a/pkgs/applications/terminal-emulators/xterm/default.nix b/pkgs/applications/terminal-emulators/xterm/default.nix index 6bae150c97b8..303c6d1b77da 100644 --- a/pkgs/applications/terminal-emulators/xterm/default.nix +++ b/pkgs/applications/terminal-emulators/xterm/default.nix @@ -1,6 +1,6 @@ { lib, stdenv, fetchurl, fetchpatch, xorg, ncurses, freetype, fontconfig , pkg-config, makeWrapper, nixosTests, gitUpdater -, nixfmt, nix, gnused, coreutils, enableDecLocator ? true }: +, nix, gnused, coreutils, enableDecLocator ? true }: stdenv.mkDerivation rec { pname = "xterm"; diff --git a/pkgs/development/compilers/scala/2.x.nix b/pkgs/development/compilers/scala/2.x.nix index 6268fea658dd..cf3f42ec0858 100644 --- a/pkgs/development/compilers/scala/2.x.nix +++ b/pkgs/development/compilers/scala/2.x.nix @@ -1,5 +1,5 @@ { stdenv, lib, fetchurl, makeWrapper, jre, gnugrep, coreutils, writeScript -, common-updater-scripts, git, gnused, nix, nixfmt, majorVersion }: +, common-updater-scripts, git, gnused, nix, nixfmt-classic, majorVersion }: let repo = "git@github.com:scala/scala.git"; @@ -83,7 +83,7 @@ stdenv.mkDerivation rec { git gnused nix - nixfmt + nixfmt-classic ] } versionSelect='v${lib.versions.major version}.${lib.versions.minor version}.*' diff --git a/pkgs/development/tools/ammonite/default.nix b/pkgs/development/tools/ammonite/default.nix index aa38d17cda6b..4a33b713d7d7 100644 --- a/pkgs/development/tools/ammonite/default.nix +++ b/pkgs/development/tools/ammonite/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, jre, writeScript, common-updater-scripts, git, nixfmt +{ lib, stdenv, fetchurl, jre, writeScript, common-updater-scripts, git, nixfmt-classic , nix, coreutils, gnused, disableRemoteLogging ? true }: let @@ -37,7 +37,7 @@ let git gnused nix - nixfmt + nixfmt-classic ] } oldVersion="$(nix-instantiate --eval -E "with import ./. {}; lib.getVersion ${pname}" | tr -d '"')" diff --git a/pkgs/development/tools/build-managers/sbt-extras/default.nix b/pkgs/development/tools/build-managers/sbt-extras/default.nix index 7d9295e9c6db..e510b0fd29ad 100644 --- a/pkgs/development/tools/build-managers/sbt-extras/default.nix +++ b/pkgs/development/tools/build-managers/sbt-extras/default.nix @@ -1,5 +1,5 @@ { lib, stdenv, fetchFromGitHub, which, curl, makeWrapper, jdk, writeScript -, common-updater-scripts, cacert, git, nixfmt, nix, jq, coreutils, gnused }: +, common-updater-scripts, cacert, git, nixfmt-classic, nix, jq, coreutils, gnused }: stdenv.mkDerivation rec { pname = "sbt-extras"; @@ -45,7 +45,7 @@ stdenv.mkDerivation rec { curl cacert git - nixfmt + nixfmt-classic nix jq coreutils diff --git a/pkgs/development/tools/continuous-integration/jenkins/default.nix b/pkgs/development/tools/continuous-integration/jenkins/default.nix index baa412d3702c..169332f46647 100644 --- a/pkgs/development/tools/continuous-integration/jenkins/default.nix +++ b/pkgs/development/tools/continuous-integration/jenkins/default.nix @@ -1,5 +1,5 @@ { lib, stdenv, fetchurl, common-updater-scripts, coreutils, git, gnused -, makeWrapper, nix, nixfmt, openjdk, writeScript, nixosTests, jq, cacert, curl +, makeWrapper, nix, nixfmt-classic, openjdk, writeScript, nixosTests, jq, cacert, curl }: stdenv.mkDerivation rec { @@ -42,7 +42,7 @@ stdenv.mkDerivation rec { gnused jq nix - nixfmt + nixfmt-classic ] } diff --git a/pkgs/shells/zsh/oh-my-zsh/default.nix b/pkgs/shells/zsh/oh-my-zsh/default.nix index 863265d27a73..93b9f596e395 100644 --- a/pkgs/shells/zsh/oh-my-zsh/default.nix +++ b/pkgs/shells/zsh/oh-my-zsh/default.nix @@ -2,7 +2,7 @@ # # https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=oh-my-zsh-git { lib, stdenv, fetchFromGitHub, nixosTests, writeScript, common-updater-scripts -, git, nix, nixfmt, jq, coreutils, gnused, curl, cacert, bash }: +, git, nix, nixfmt-classic, jq, coreutils, gnused, curl, cacert, bash }: stdenv.mkDerivation rec { version = "2023-11-29"; @@ -84,7 +84,7 @@ stdenv.mkDerivation rec { curl cacert git - nixfmt + nixfmt-classic nix jq coreutils diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 068e2a670cb9..1bc6df2632d2 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -848,6 +848,7 @@ mapAliases ({ nix_2_4 = nixVersions.nix_2_4; nix_2_5 = nixVersions.nix_2_5; nix_2_6 = nixVersions.nix_2_6; + nixfmt = lib.warn "nixfmt was renamed to nixfmt-classic. The nixfmt attribute may be used for the new RFC 166-style formatter in the future, which is currently available as nixfmt-rfc-style" nixfmt-classic; # Added 2024-03-31 nixops = throw "'nixops' has been removed. Please use 'nixops_unstable_minimal' for the time being. E.g. nixops_unstable_minimal.withPlugins (ps: [ ps.nixops-gce ])"; # Added 2023-10-26 nixopsUnstable = nixops_unstable; # Added 2022-03-03 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 3b5d0a5fe433..dae07d1a00d5 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -40091,7 +40091,7 @@ with pkgs; inherit (darwin.apple_sdk.frameworks) Security; }; - nixfmt = haskellPackages.nixfmt.bin; + nixfmt-classic = haskellPackages.nixfmt.bin; nixpkgs-fmt = callPackage ../tools/nix/nixpkgs-fmt { };