don't clean cpp files
This commit is contained in:
parent
fc304df35e
commit
5a3e6089b4
1 changed files with 10 additions and 1 deletions
11
flake.nix
11
flake.nix
|
@ -23,7 +23,16 @@
|
||||||
toolchain = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
|
toolchain = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
|
||||||
craneLib = (crane.mkLib pkgs).overrideToolchain(_: toolchain);
|
craneLib = (crane.mkLib pkgs).overrideToolchain(_: toolchain);
|
||||||
lib = pkgs.lib;
|
lib = pkgs.lib;
|
||||||
src = craneLib.cleanCargoSource ./.;
|
|
||||||
|
# don't clean cpp files
|
||||||
|
cppFilter = path: _type: builtins.match ".*(cpp|hpp)$" path != null;
|
||||||
|
cppOrCargo = path: type:
|
||||||
|
(cppFilter path type) || (craneLib.filterCargoSources path type);
|
||||||
|
src = lib.cleanSourceWith {
|
||||||
|
src = ./.;
|
||||||
|
filter = cppOrCargo;
|
||||||
|
name = "source";
|
||||||
|
};
|
||||||
|
|
||||||
commonArgs = {
|
commonArgs = {
|
||||||
inherit src;
|
inherit src;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue