reflex-platform
reflex-platform copied to clipboard
Reflex-platform should run lib.cleanSource on packages passed to project
Reflex-platform accepts the "packages" attrset that maps local packages Cabal names to the local directory containing the developed source code. This directory could have caches, backups, or other garbage files that may interfere with building.
Nix provides the lib.cleanSource function to delete these paths matching the wildcard. To make things easier on users, it might make sense to clean those paths passed in packages automatically.
Any reason not to use https://github.com/hercules-ci/gitignore.nix instead?
I've wanted that as well. However we did run into a very strange issue that seemed to come from gitignore.nix: https://github.com/obsidiansystems/obelisk/blob/d9df151ed175be4f2dff721676e412a88a0596c1/nixpkgs-overlays/default.nix#L8-L12
lib.cleanSource (gitignoreSource src);
Isn't lib.cleanSource
here redundant? I guess you need it only if you have a global gitignore configuration that ignores extra stuff (ref).
It probably is but the point is that we had some very strange behavior after using gitignoreSource so it makes me hesitant to apply it to everyone.