diff --git a/.srcignore b/.srcignore new file mode 100644 index 0000000..d104ee6 --- /dev/null +++ b/.srcignore @@ -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: diff --git a/package.nix b/package.nix index a4b4b9f..c0379ec 100644 --- a/package.nix +++ b/package.nix @@ -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;