build: Ignore test files when building target

This commit is contained in:
Leni Aniva 2024-03-28 22:23:19 -07:00
parent 4a89aaf70e
commit 4a1114ab00
1 changed files with 7 additions and 2 deletions

View File

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