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, ... }:
|
||||
let
|
||||
toolchain = fpkgs.minimal.toolchain;
|
||||
fs = pkgs.lib.fileset;
|
||||
in
|
||||
rec {
|
||||
default = flurry;
|
||||
|
|
@ -34,7 +35,16 @@
|
|||
pname = "flurry";
|
||||
version = "0.1.0";
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue