about summary refs log tree commit diff
path: root/third_party/overlays
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2021-12-18T13·01+0300
committertazjin <mail@tazj.in>2021-12-18T20·26+0000
commitd01848437635184b685088db7e86d7df7eb1584a (patch)
treeee1c00f79e741bf7d17445bd97768efe26377d72 /third_party/overlays
parent3090f61713c7360b12d5ae710686376b0c5e6f82 (diff)
feat(tools/depotfmt): add a treefmt wrapper with depot configuration r/3295
Right now the only included formatter is gofmt, but we will extend
this over time.

The version of treefmt is bumped to 0.3.0 (which supports custom
config files) until this lands in nixpkgs.

Change-Id: I1e1aafd05ec7427c616f90c90490c528ecb2615c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/4399
Tested-by: BuildkiteCI
Reviewed-by: grfn <grfn@gws.fyi>
Diffstat (limited to 'third_party/overlays')
-rw-r--r--third_party/overlays/tvl.nix17
1 files changed, 17 insertions, 0 deletions
diff --git a/third_party/overlays/tvl.nix b/third_party/overlays/tvl.nix
index 80f337200176..df21e8819bbe 100644
--- a/third_party/overlays/tvl.nix
+++ b/third_party/overlays/tvl.nix
@@ -59,4 +59,21 @@ self: super: {
   mkShell = super.lib.makeOverridable(args: (super.mkShell args) // {
     meta.ci = false;
   });
+
+  # bump treefmt to a newer version that includes our config file patch
+  treefmt = super.treefmt.overrideAttrs(drv: rec {
+    version = "0.3.0";
+
+    src = super.fetchFromGitHub {
+      owner = "numtide";
+      repo = "treefmt";
+      rev = "v${version}";
+      sha256 = "0jnfak6wmqpqwymja9bsw54al50yqzdy7lxfx66rqamqsvngqd1x";
+    };
+
+    cargoDeps = drv.cargoDeps.overrideAttrs(_: {
+      inherit src;
+      outputHash = "19p15gavcjldn1di7yyn80ys6rj4ajaprqk8x34vxslr4y2qychf";
+    });
+  });
 }