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";
|
||||
|
||||
# Source files (filtered to exclude build artifacts)
|
||||
src = lib.sourceFilesBySuffices ../. [
|
||||
".ex"
|
||||
".exs"
|
||||
".eex"
|
||||
".heex"
|
||||
".leex"
|
||||
".erl"
|
||||
".hrl"
|
||||
".js"
|
||||
".ts"
|
||||
".css"
|
||||
".json"
|
||||
".proto"
|
||||
".md"
|
||||
".txt"
|
||||
".mib"
|
||||
".gitignore"
|
||||
];
|
||||
src = lib.cleanSourceWith {
|
||||
src = ../.;
|
||||
filter =
|
||||
path: type:
|
||||
let
|
||||
baseName = baseNameOf path;
|
||||
parentDir = baseNameOf (dirOf path);
|
||||
in
|
||||
# Exclude build artifacts and temp directories
|
||||
baseName != "_build"
|
||||
&& baseName != "deps"
|
||||
&& baseName != ".elixir_ls"
|
||||
&& baseName != ".elixir-tools"
|
||||
&& baseName != "node_modules"
|
||||
&& baseName != "cover"
|
||||
&& baseName != ".git"
|
||||
&& 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
|
||||
# but exclude build artifacts
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue