Include JSONC file when building via Nix

This commit is contained in:
Joseph LaFreniere 2023-04-23 19:11:26 -05:00
parent 5fa777605d
commit 096ebc9b53
No known key found for this signature in database
GPG Key ID: EE236AA0141EFCA3

View File

@ -39,7 +39,12 @@
inherit (pkgs) lib; inherit (pkgs) lib;
craneLib = crane.lib.${system}; craneLib = crane.lib.${system};
src = craneLib.cleanCargoSource ./.; 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);
};
buildInputs = with pkgs; buildInputs = with pkgs;
[ ffmpeg imagemagick pandoc poppler_utils ripgrep tesseract ] [ ffmpeg imagemagick pandoc poppler_utils ripgrep tesseract ]