From 3f7894ef03dcd5a0dc3ae6a957e6c34d3439e89a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Thu, 15 May 2025 14:13:37 +0200 Subject: [PATCH] clan-app: filter out unrelated files from build this should help for faster ci builds. --- pkgs/clan-app/default.nix | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/pkgs/clan-app/default.nix b/pkgs/clan-app/default.nix index 0112f6681..efc61afb0 100644 --- a/pkgs/clan-app/default.nix +++ b/pkgs/clan-app/default.nix @@ -10,9 +10,23 @@ wrapGAppsHook4, gobject-introspection, gtk4, + lib, }: let - source = ./.; + source = + { + withTests ? true, + }: + lib.fileset.toSource { + root = ./.; + fileset = lib.fileset.unions ( + [ + ./clan_app + ./pyproject.toml + ] + ++ lib.optional withTests ./tests + ); + }; desktop-file = makeDesktopItem { name = "org.clan.app"; @@ -53,7 +67,7 @@ let in pythonRuntime.pkgs.buildPythonApplication { name = "clan-app"; - src = source; + src = source { }; format = "pyproject"; dontWrapGApps = true; @@ -99,7 +113,7 @@ pythonRuntime.pkgs.buildPythonApplication { ]; } '' - cp -r ${source} ./src + cp -r ${source { withTests = true; }} ./src chmod +w -R ./src cd ./src