From 6e6471b35c1a3eeee25da1c93c1988e019454fdd Mon Sep 17 00:00:00 2001 From: RGBCube Date: Mon, 8 Jan 2024 16:49:58 +0300 Subject: [PATCH] Update source filters --- flake.nix | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/flake.nix b/flake.nix index 6080496..4993777 100644 --- a/flake.nix +++ b/flake.nix @@ -47,15 +47,19 @@ crane = inputs.crane.lib.${system}.overrideToolchain toolchain; cssFilter = path: type: builtins.match ".*css$" path != null; + gifFilter = path: type: builtins.match ".*gif$" path != null; jsFilter = path: type: builtins.match ".*js$" path != null; - assetFilter = path: type: type == "directory" && builtins.match "^assets.*" path != null; + mdFilter = path: type: builtins.match ".*md$" path != null; + woff2Filter = path: type: builtins.match ".*woff2$" path != null; - src = lib.cleanSourceWith { - src = crane.path ./.; - filter = path: type: (crane.filterCargoSources path type) + src = lib.cleanSourceWith { + src = crane.path ./.; + filter = path: type: (crane.filterCargoSources path type) || (cssFilter path type) + || (gifFilter path type) || (jsFilter path type) - || (assetFilter path type); + || (mdFilter path type) + || (woff2Filter path type); }; srcArgs = {