Skip to content

Commit

Permalink
minimize treefmt rebuild
Browse files Browse the repository at this point in the history
  • Loading branch information
zimbatm committed Jul 5, 2022
1 parent ac9fbe6 commit 51826cc
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,15 @@ let
treefmt = rustPackages.rustPlatform.buildRustPackage {
inherit (cargoToml.package) name version;

src = nixpkgs.lib.cleanSource ./.;
src = builtins.path {
path = ./.;
filter = name: type:
name == toString ./Cargo.toml
|| name == toString ./Cargo.lock
|| lib.hasPrefix (toString ./src) name
|| lib.hasPrefix (toString ./benches) name
;
};

buildInputs = with nixpkgs; lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security libiconv ];

Expand Down

0 comments on commit 51826cc

Please sign in to comment.