Created
August 11, 2016 11:06
-
-
Save expipiplus1/39dd6ab5eb530a4cf2693de5b7d844ef to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# If this source is local, strip a bunch of things from the source before | |
# building to make the hash change a little less often on local machines. | |
# This doesn't filter non-local sources. | |
maybeFilterSource = src: | |
if !isList src && | |
!isFunction src && | |
!isDerivation src && | |
!isStorePath src | |
then defaultSourceFilter src | |
else src; | |
# Filter source with some sensible defaults | |
defaultSourceFilter = | |
builtins.filterSource (path: type: | |
type != "unknown" && | |
baseNameOf path != ".gitignore" && | |
baseNameOf path != "result" && | |
!(hasSuffix "~" path) && | |
(baseNameOf path == ".git" -> type != "directory") && | |
(baseNameOf path == "dist" -> type != "directory") && | |
(baseNameOf path == "make" -> type != "directory") && | |
(baseNameOf path == ".stack-work" -> type != "directory") | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment