flake: make src use fileset.union instead of all files (#28)
Nix rebuilds the whole thing when some source changed, but since some of the files are not used at all first make a source folder with just the necessary files
This commit is contained in:
parent
8d867cf8f2
commit
2869412050
1 changed files with 11 additions and 1 deletions
12
flake.nix
12
flake.nix
|
|
@ -26,6 +26,7 @@
|
||||||
({ pkgs, fpkgs, ... }:
|
({ pkgs, fpkgs, ... }:
|
||||||
let
|
let
|
||||||
toolchain = fpkgs.minimal.toolchain;
|
toolchain = fpkgs.minimal.toolchain;
|
||||||
|
fs = pkgs.lib.fileset;
|
||||||
in
|
in
|
||||||
rec {
|
rec {
|
||||||
default = flurry;
|
default = flurry;
|
||||||
|
|
@ -34,7 +35,16 @@
|
||||||
pname = "flurry";
|
pname = "flurry";
|
||||||
version = "0.1.0";
|
version = "0.1.0";
|
||||||
cargoLock.lockFile = ./Cargo.lock;
|
cargoLock.lockFile = ./Cargo.lock;
|
||||||
src = pkgs.lib.cleanSource ./.;
|
src = fs.toSource {
|
||||||
|
root = ./.;
|
||||||
|
fileset = fs.unions [
|
||||||
|
./Cargo.lock
|
||||||
|
./Cargo.toml
|
||||||
|
./flake.nix
|
||||||
|
./flake.lock
|
||||||
|
./src
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
devShells = forAllSystems
|
devShells = forAllSystems
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue