Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Data-Files cabal directive should support directories #713
(Imported from Trac #722, reported by cygnus on 2010-08-02)
It should be possible to use the Data-Files directive to include whole directories (recursively) in source distributions. In many cases it's impossible or cumbersome to list all of the files one would like to install, and it seems to me that nobody should have to do that if what they really mean is, "install everything in that-data-dir/."
In implementation terms, this doesn't strike me as too tricky; after the wildcard parsing that already happens, detect whether the files to be copied are in fact directories and copy them recursively as such.
I'm more than willing to hack on this.
I think we should discuss this with users a bit first. The point of the existing rather limited support for globbing is to avoid accidentally picking up more files than was intended (e.g. hidden or generated files). By limiting it to files with a common extension this risk is greatly reduced. Perhaps we could make it explicit by only doing recursive copy for directories that are listed in the data-files field with a trailing directory slash, e.g. data-files: graphics/