feat(nix): add source filtering

this - along with garnix - should mostly eliminate unneeded (re)builds

Signed-off-by: seth <getchoo@tuta.io>
This commit is contained in:
seth
2023-09-09 15:10:15 -04:00
parent 6aa821df9c
commit 10192c540b
3 changed files with 34 additions and 1 deletions

View File

@ -26,11 +26,27 @@
overlays.default = final: prev: let
version = builtins.substring 0 8 self.lastModifiedDate or "dirty";
filteredSelf = inputs.nix-filter.lib.filter {
root = ../.;
include = [
"buildconfig"
"cmake"
"launcher"
"libraries"
"program_info"
"tests"
../COPYING.md
../CMakeLists.txt
];
};
# common args for prismlauncher evaluations
unwrappedArgs = {
self = filteredSelf;
inherit (inputs) libnbtplusplus;
inherit ((final.darwin or prev.darwin).apple_sdk.frameworks) Cocoa;
inherit self version;
inherit version;
};
in {
prismlauncher-qt5-unwrapped = prev.libsForQt5.callPackage ./pkg unwrappedArgs;