Exclude more paths from colmena.src to reduce rebuilds

This commit is contained in:
Zhaofeng Li 2024-11-07 16:40:19 -07:00
parent 2c95c1766a
commit a70411fd1d
2 changed files with 26 additions and 10 deletions

18
.srcignore Normal file
View file

@ -0,0 +1,18 @@
# Exclusions from source distribution
#
# Files listed here will not be part of colmena.src
/.github
/CNAME
/renovate.json
/manual
/integration-tests
/nix
/default.nix
/flake-compat.nix
/package.nix
/shell.nix
# vim: set ft=gitignore:

View file

@ -1,18 +1,16 @@
{ lib, stdenv, rustPlatform, installShellFiles, nix-eval-jobs }:
{ lib
, stdenv
, rustPlatform
, nix-gitignore
, installShellFiles
, nix-eval-jobs
}:
rustPlatform.buildRustPackage rec {
pname = "colmena";
version = "0.5.0-pre";
src = lib.cleanSourceWith {
filter = name: type: !(type == "directory" && builtins.elem (baseNameOf name) [
".github"
"target"
"manual"
"integration-tests"
]);
src = lib.cleanSource ./.;
};
src = nix-gitignore.gitignoreSource [ ./.srcignore ] ./.;
cargoLock = {
lockFile = ./Cargo.lock;