even stricter source directory filtering for better caching

This commit is contained in:
778a69cd 2023-11-23 19:32:46 +01:00
parent d31a5b68ec
commit 0530612b78

View file

@ -24,17 +24,31 @@
packages = forAllSystems (system:
let
pkgs = nixpkgsFor.${system};
# Directories that are neither needed for building the frontend nor the backend.
# For better build caching.
unrelatedDirs = [
"flake.lock"
(filter.matchExt "nix")
"docs"
"docker"
"docker-compose.test.yml"
"docker-compose.yml"
"generate-test-data"
];
in
{
mobilizon = pkgs.callPackage ./. {
src = filter {
root = ./.;
exclude = [
"flake.lock"
(filter.matchExt "nix")
"src"
(filter.matchExt "js")
];
(filter.matchExt "ts")
(filter.matchExt "json")
"tests"
"scripts"
"public"
] ++ unrelatedDirs;
};
src-config = ./config;
mobilizon-js = self.packages."${system}".mobilizon-frontend;
@ -50,11 +64,12 @@
(filter {
root = ./.;
exclude = [
"flake.lock"
(filter.matchExt "nix")
"lib"
"config"
];
"test"
"rel"
"support"
] ++ unrelatedDirs;
})
{
inherit nodejs;