Open codygman opened 4 years ago
You can achieve this by using gitignoreFilter directly.
Since you're using hpack, you might be interested in pre-commit-hooks.nix, which had hpack support merged recently.
Can you provide an example in gitignoreFilter
how to apply a list of files/paths you want to ignore on top of whatever gitignoreSource
does? I'm trying to replicate the old nix-gitignore.gitignoreSource
:
src = nix-gitignore.gitignoreSource [
".git"
"/*.nix"
".*"
] ./.;
You can modify the filter expression at the nix level with gitignoreFilter, but currently there's no interface for inserting extra rules, or for working off manually provided rules only. These features can be added of course.
I have the following:
This worked alright until in lorri/issues#415 it was recommended that I make generating hpack part of my build process. So I did that like this:
But now I need to unignore the cabal file so that lorri will watch changes to it. Is there a way to do this? Can I compose a function to add a filepath back after cleanSourceWith?