chore(docs): Link to fileset docs

This commit is contained in:
Sridhar Ratnakumar 2024-05-16 21:16:56 -04:00 committed by GitHub
parent e47512f9a1
commit 7cdc00218a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -45,7 +45,7 @@ When a local package is the only top-level one, however, any file in the reposit
To avoid rebuilding the top-level package whenever irrelevant files change, you can do one of the following:
- Put the top-level package in a sub-directory.
- Or, set `projectRoot` to a subset of your flake root, [for example](https://github.com/srid/haskell-template/blob/033913a6fe418ea0c25ec2c2604ab4030563ba2e/flake.nix#L28-L34):
- Or, set `projectRoot` to a subset of your flake root using [`fileset.toSource`](https://nixos.org/manual/nixpkgs/stable/#function-library-example-lib.fileset.toSource). For [example](https://github.com/srid/haskell-template/blob/033913a6fe418ea0c25ec2c2604ab4030563ba2e/flake.nix#L28-L34):
```nix
{
haskellProjects.default = {
@ -60,4 +60,4 @@ To avoid rebuilding the top-level package whenever irrelevant files change, you
}
```
[`cleanSourceWith`]: https://github.com/srid/haskell-flake/blob/67db46409b4c2e92abf27ddde7c75ae310d4068c/nix/build-haskell-package.nix#L15-L24
[`cleanSourceWith`]: https://github.com/srid/haskell-flake/blob/67db46409b4c2e92abf27ddde7c75ae310d4068c/nix/build-haskell-package.nix#L15-L24