fix: Use cleanSourceWith for better source filtering
Replace sourceFilesBySuffices with cleanSourceWith to ensure vendor directory and all dependencies are properly included. This fixes the oban_met compilation error.
This commit is contained in:
parent
3ce8c480f2
commit
399a9571fd
1 changed files with 24 additions and 18 deletions
|
|
@ -11,24 +11,30 @@ beamPackages.mixRelease {
|
||||||
version = "0.1.0";
|
version = "0.1.0";
|
||||||
|
|
||||||
# Source files (filtered to exclude build artifacts)
|
# Source files (filtered to exclude build artifacts)
|
||||||
src = lib.sourceFilesBySuffices ../. [
|
src = lib.cleanSourceWith {
|
||||||
".ex"
|
src = ../.;
|
||||||
".exs"
|
filter =
|
||||||
".eex"
|
path: type:
|
||||||
".heex"
|
let
|
||||||
".leex"
|
baseName = baseNameOf path;
|
||||||
".erl"
|
parentDir = baseNameOf (dirOf path);
|
||||||
".hrl"
|
in
|
||||||
".js"
|
# Exclude build artifacts and temp directories
|
||||||
".ts"
|
baseName != "_build"
|
||||||
".css"
|
&& baseName != "deps"
|
||||||
".json"
|
&& baseName != ".elixir_ls"
|
||||||
".proto"
|
&& baseName != ".elixir-tools"
|
||||||
".md"
|
&& baseName != "node_modules"
|
||||||
".txt"
|
&& baseName != "cover"
|
||||||
".mib"
|
&& baseName != ".git"
|
||||||
".gitignore"
|
&& baseName != ".nix-postgres"
|
||||||
];
|
&& baseName != ".nix-redis"
|
||||||
|
&& baseName != ".nix-mix"
|
||||||
|
&& baseName != ".nix-hex"
|
||||||
|
&& baseName != ".worktrees"
|
||||||
|
# Include vendor directory and all its contents
|
||||||
|
&& (parentDir == "vendor" || baseName == "vendor" || true);
|
||||||
|
};
|
||||||
|
|
||||||
# Filter function to include necessary files and directories
|
# Filter function to include necessary files and directories
|
||||||
# but exclude build artifacts
|
# but exclude build artifacts
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue