From e579d3869da12999f22b55e2799207ee74604beb Mon Sep 17 00:00:00 2001 From: Ilan Joselevich Date: Mon, 19 Aug 2024 20:18:40 +0300 Subject: feat(tools/depotfmt): Get gofmt from pkgs.go instead of buildGo This allows importing just //tools/depotfmt.nix when using a josh workspace. Change-Id: Idf7eb438be1cc1e60445aace982fdca1f4367595 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12254 Tested-by: BuildkiteCI Autosubmit: Ilan Joselevich Reviewed-by: flokli --- tools/depotfmt.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools') diff --git a/tools/depotfmt.nix b/tools/depotfmt.nix index e40001018c37..04dd6ffc7555 100644 --- a/tools/depotfmt.nix +++ b/tools/depotfmt.nix @@ -1,6 +1,6 @@ # Builds treefmt for depot, with a hardcoded configuration that # includes the right paths to formatters. -{ depot, pkgs, ... }: +{ pkgs, ... }: let # terraform fmt can't handle multiple paths at once, but treefmt @@ -11,7 +11,7 @@ let config = pkgs.writeText "depot-treefmt-config" '' [formatter.go] - command = "${depot.nix.buildGo.go}/bin/gofmt" + command = "${pkgs.go}/bin/gofmt" options = [ "-w" ] includes = ["*.go"] -- cgit 1.4.1