build: Ignore test files when building target

This commit is contained in:
Leni Aniva 2024-03-28 22:23:19 -07:00
parent 1d1a151a4b
commit c5404b8210
Signed by: aniva
GPG Key ID: 4D9B1C8D10EA4C50
1 changed files with 7 additions and 2 deletions

View File

@ -39,7 +39,13 @@
name = "Pantograph";
#roots = pkgs.lib.optional pkgs.stdenv.isDarwin [ "Main" "Pantograph" ];
roots = [ "Main" "Pantograph" ];
src = ./.;
src = pkgs.lib.cleanSourceWith {
src = ./.;
filter = path: type:
!(pkgs.lib.hasInfix "/Test/" path) &&
!(pkgs.lib.hasSuffix ".md" path) &&
!(pkgs.lib.hasSuffix "Makefile" path);
};
};
test = leanPkgs.buildLeanPackage {
name = "Test";
@ -58,7 +64,6 @@
packages = {
inherit (leanPkgs) lean lean-all;
inherit (project) sharedLib executable;
test = test.executable;
default = project.executable;
};
checks = {