From 47db036c9e288810a8988f1ff92746daad3a15c4 Mon Sep 17 00:00:00 2001 From: V Date: Thu, 12 Aug 2021 14:08:17 +0200 Subject: ripple/nix: add rustfmt `imports_granularity = "One"` patch This lets us use an unreleased formatting variant that merges all use statements into a single block. Change-Id: I0ff9fb960171c9af3dbd3a841e35e17a4965a246 --- ripple/nix/default.nix | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'ripple/nix/default.nix') diff --git a/ripple/nix/default.nix b/ripple/nix/default.nix index 065fdee..cf4273b 100644 --- a/ripple/nix/default.nix +++ b/ripple/nix/default.nix @@ -2,4 +2,16 @@ # SPDX-License-Identifier: OSL-3.0 let sources = import ./sources.nix {}; -in import sources.nixpkgs {} +in import sources.nixpkgs { + overlays = [ + (final: prev: { + rustfmt = prev.rustfmt.overrideAttrs ({ patches ? [], ... }: { + patches = patches ++ [ + # Adds an option variant that merges all use statements into a single block. + # Taken from https://github.com/rust-lang/rustfmt/pull/4680 + ./Implement-One-option-for-imports_granularity-4669.patch + ]; + }); + }) + ]; +} -- cgit 1.4.1