use nix-filter to filter sources

This prevents nix from rebuilding conduit when files that don't actually
effect the build are changed.
This commit is contained in:
Charles Hall 2024-01-18 13:05:55 -08:00
parent f8bdfd82b0
commit 02781e4f9b
No known key found for this signature in database
GPG key ID: 7B8E0645816E07CF
2 changed files with 26 additions and 1 deletions

View file

@ -59,6 +59,21 @@
"type": "github"
}
},
"nix-filter": {
"locked": {
"lastModified": 1705332318,
"narHash": "sha256-kcw1yFeJe9N4PjQji9ZeX47jg0p9A0DuU4djKvg1a7I=",
"owner": "numtide",
"repo": "nix-filter",
"rev": "3449dc925982ad46246cfc36469baf66e1b64f17",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "nix-filter",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1705496572,
@ -80,6 +95,7 @@
"crane": "crane",
"fenix": "fenix",
"flake-utils": "flake-utils",
"nix-filter": "nix-filter",
"nixpkgs": "nixpkgs"
}
},

View file

@ -2,6 +2,7 @@
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs?ref=nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
nix-filter.url = "github:numtide/nix-filter";
fenix = {
url = "github:nix-community/fenix";
@ -17,6 +18,7 @@
{ self
, nixpkgs
, flake-utils
, nix-filter
, fenix
, crane
@ -73,7 +75,14 @@
in
{
packages.default = builder {
src = ./.;
src = nix-filter {
root = ./.;
include = [
"src"
"Cargo.toml"
"Cargo.lock"
];
};
# This is redundant with CI
doCheck = false;