even stricter source directory filtering for better caching
This commit is contained in:
parent
d31a5b68ec
commit
0530612b78
27
flake.nix
27
flake.nix
|
@ -24,17 +24,31 @@
|
||||||
packages = forAllSystems (system:
|
packages = forAllSystems (system:
|
||||||
let
|
let
|
||||||
pkgs = nixpkgsFor.${system};
|
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
|
in
|
||||||
{
|
{
|
||||||
mobilizon = pkgs.callPackage ./. {
|
mobilizon = pkgs.callPackage ./. {
|
||||||
src = filter {
|
src = filter {
|
||||||
root = ./.;
|
root = ./.;
|
||||||
exclude = [
|
exclude = [
|
||||||
"flake.lock"
|
|
||||||
(filter.matchExt "nix")
|
|
||||||
"src"
|
"src"
|
||||||
(filter.matchExt "js")
|
(filter.matchExt "js")
|
||||||
];
|
(filter.matchExt "ts")
|
||||||
|
(filter.matchExt "json")
|
||||||
|
"tests"
|
||||||
|
"scripts"
|
||||||
|
"public"
|
||||||
|
] ++ unrelatedDirs;
|
||||||
};
|
};
|
||||||
src-config = ./config;
|
src-config = ./config;
|
||||||
mobilizon-js = self.packages."${system}".mobilizon-frontend;
|
mobilizon-js = self.packages."${system}".mobilizon-frontend;
|
||||||
|
@ -50,11 +64,12 @@
|
||||||
(filter {
|
(filter {
|
||||||
root = ./.;
|
root = ./.;
|
||||||
exclude = [
|
exclude = [
|
||||||
"flake.lock"
|
|
||||||
(filter.matchExt "nix")
|
|
||||||
"lib"
|
"lib"
|
||||||
"config"
|
"config"
|
||||||
];
|
"test"
|
||||||
|
"rel"
|
||||||
|
"support"
|
||||||
|
] ++ unrelatedDirs;
|
||||||
})
|
})
|
||||||
{
|
{
|
||||||
inherit nodejs;
|
inherit nodejs;
|
||||||
|
|
Loading…
Reference in a new issue