Skip to content

Commit 277b56f

Browse files
committed
use nix-filter
This prevents surprising rebuilds after editing files that don't actually influence builds.
1 parent e23ff50 commit 277b56f

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

flake.gen.nix

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
inputs = {
33
nixpkgs.url = "github:NixOS/nixpkgs?ref=nixos-unstable";
44
flake-utils.url = "github:numtide/flake-utils?ref=main";
5+
nix-filter.url = "github:numtide/nix-filter?ref=main";
56

67
fenix = {
78
url = "github:nix-community/fenix?ref=main";
@@ -49,7 +50,15 @@
4950
in
5051
{
5152
packages.default = builder {
52-
src = ./.;
53+
src = let filter = inputs.nix-filter.lib; in filter {
54+
root = ./.;
55+
include = [
56+
"Cargo.lock"
57+
"Cargo.toml"
58+
"README.md"
59+
"src"
60+
];
61+
};
5362

5463
inherit stdenv;
5564
};

0 commit comments

Comments
 (0)