From ff0b92300af4cef98c05da4d7c154f67eb86e9e2 Mon Sep 17 00:00:00 2001 From: Joseph LaFreniere Date: Sat, 1 Jul 2023 19:31:03 -0500 Subject: [PATCH] Reuse Nix-built Cargo deps throughout flake --- flake.nix | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/flake.nix b/flake.nix index 80ea1a4..06b2e3d 100644 --- a/flake.nix +++ b/flake.nix @@ -45,10 +45,8 @@ craneLib = crane.lib.${system}; src = pkgs.lib.cleanSourceWith { - src = craneLib.path ./.; # original, unfiltered source - filter = path: type: - (builtins.match ".*jsonc$" path != null) # include JSONC files - || (craneLib.filterCargoSources path type); + src = craneLib.path ./.; + filter = pkgs.lib.cleanSourceFilter; }; buildInputs = with pkgs; @@ -115,7 +113,7 @@ # NB: cargo-tarpaulin only supports x86_64 systems # Check code coverage (note: this will not upload coverage anywhere) rga-coverage = - craneLib.cargoTarpaulin { inherit cargoArtifacts src; }; + craneLib.cargoTarpaulin { inherit buildInputs cargoArtifacts src; }; }; # `nix build`