
On Sun, 2012-12-16 at 20:14 +0100, Herbert Valerio Riedel wrote:
Hello Cabal Devs,
Since the recurring topic of software licenses is being discussed on haskell-cafe again, I was wondering what the .cabal license-field should be for packages linking _directly_ to C-libraries, such as Haskell language bindings to C-libraries.
To be more specific: As a side-effect of the ongoing discussion, Michael Snoyman implemented a web-based tool for computing the transitive license multiset[1] which made me wonder whether the .cabal license field should describe only the license of the source code proper distributed with the package or whether it should also take into account the licenses of the wrapped/linked libraries?
It should be the license of that package's source code only. The full bag of licenses can indeed be calculated. So bindings are not special (unless they actually ship the C source code as part of the package). Calculating the licenses when C libs are involved as dependencies is more tricky because the license info isn't quite so easily available in a machine readable form. You'd probably want to combine info from say the debian package db, find out which debian packages provide which C libs, and we know which C libs are needed by each cabal package. Join those two together and look up the license of the debian packages providing the C libs.
PS: A separate but related issue was raised in the haskell-cafe discussion: Many packages depend on the cpphs library as a hack, although they only need the cpphs executable (and therefore don't link against the cpphs package). This also skews the result that tools like [1] report, as the cpphs library is LGPLed which doesn't matter if only the cpphs executable was actually used for building the package.
That'd be solved if we did dependencies on programs properly. Duncan