
On Tue, 2011-01-25 at 23:03 -0800, John Millikin wrote:
It's not possible for a .cabal file to specify which license the final binaries will use -- it depends on what libraries are locally installed, what flags the build uses, and what the executables themselves link.
It's certainly possible for library authors to indicate in their Cabal files the licensing restrictions that use of the library will place on the end result. The library author knows about all of this stuff. Sure, it may not be a perfect system -- but in practice, flags should probably not change licensing anyway, and there will nearly always be some license that is the most restrictive of all that apply and so can be said to govern the end result by itself. Of course the final executable would need to collect the licensing restrictions of all of its dependencies. But it then would not need to recursively check their dependencies, and so on.
Since it's impossible for Cabal/Hackage to work as you describe, it's only sensible to interpret the "license" field as applying to the source code archive.
As mentioned earlier, though, this leaves others in the position of hunting through the source code of all the direct and indirect dependencies of their project, looking for additional restrictions that might be hiding there. That's a pretty ridiculous requirement, and makes it unreasonably difficult to comply with the wishes of library authors. -- Chris Smith