mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-02-24 00:00:19 +03:00
build(nix): filter src to reduce useless rebuilds
This in particular speeds up the dev/run/debug cycle for writing more tests. Without this, the actual bcachefs-tools package will be rebuilt by Nix all the time because of changes to files that are tracked by git. Even when it's changes in parts that aren't relevant to that package build such as `checks/*`. Signed-off-by: Thomas Mühlbacher <tmuehlbacher@posteo.net>
This commit is contained in:
parent
3e50eea605
commit
922ba240c5
13
flake.nix
13
flake.nix
@ -58,6 +58,7 @@
|
|||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
inherit (builtins) readFile split;
|
inherit (builtins) readFile split;
|
||||||
|
inherit (lib) fileset;
|
||||||
inherit (lib.lists) findFirst;
|
inherit (lib.lists) findFirst;
|
||||||
inherit (lib.strings) hasPrefix removePrefix substring;
|
inherit (lib.strings) hasPrefix removePrefix substring;
|
||||||
|
|
||||||
@ -74,7 +75,17 @@
|
|||||||
|
|
||||||
commonArgs = {
|
commonArgs = {
|
||||||
inherit version;
|
inherit version;
|
||||||
src = self;
|
src = fileset.toSource {
|
||||||
|
root = ./.;
|
||||||
|
|
||||||
|
fileset = fileset.difference (fileset.gitTracked ./.) (
|
||||||
|
fileset.unions [
|
||||||
|
./checks
|
||||||
|
./doc
|
||||||
|
./tests
|
||||||
|
]
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
env = {
|
env = {
|
||||||
PKG_CONFIG_SYSTEMD_SYSTEMDSYSTEMUNITDIR = "${placeholder "out"}/lib/systemd/system";
|
PKG_CONFIG_SYSTEMD_SYSTEMDSYSTEMUNITDIR = "${placeholder "out"}/lib/systemd/system";
|
||||||
|
Loading…
Reference in New Issue
Block a user