You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add a command for generating a legal boilerplate page #4887
As @hvr mentioned in #4883, a lot of libraries cabal-install depends on have the following (or similar) standard requirement:
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
Since we provide binary downloads of cabal-install, we should somehow comply with that. I think that the easiest way would be to add a "Legal" appendix to the manual listing the licenses of all of our dependencies. There should also be a way to generate such a page from a .cabal file in HTML or/and ReST format -- and since it's generally useful, this functionality should be part of cabal-install.
It's a bit tricky to get cabal-install to automatically generate a license manifest of its dependencies license files and have it included in the executable without some hefty custom Setup.hs which needs to interact with the package db (and also needs to handle inplace packages).
Maybe it's easier to have a license manifest generated as a text-file (think a command cabal gen-manifest [FLAGS] <component(s)> modulo bikeshed; I think that's what you're suggesting?), like e.g. https://gist.github.com/ekmett/34024e26479763d77bc3e1ecaa24b819 and place it close to the respective cabal binaries; it'd be generally useful to have an exact manifest of all the artifacts and their versions that were compiled into the cabal executable.
PS: Btw, while iirc we do install the licence-files declared in the .cabal file (which can be more than a single file btw), we don't record their install-location in registration data passed to ghc-pkg; so iirc we have no reliable way to locate the licence-files for installed Haskell packages, which is a bit sub-optimal. iirc that's a problem @ekmett was struggling with when he wrote his tool.
Activity
hvr commentedon Nov 13, 2017
It's a bit tricky to get
cabal-installto automatically generate a license manifest of its dependencies license files and have it included in the executable without some hefty customSetup.hswhich needs to interact with the package db (and also needs to handle inplace packages).Maybe it's easier to have a license manifest generated as a text-file (think a command
cabal gen-manifest [FLAGS] <component(s)>modulo bikeshed; I think that's what you're suggesting?), like e.g.https://gist.github.com/ekmett/34024e26479763d77bc3e1ecaa24b819 and place it close to the respective
cabalbinaries; it'd be generally useful to have an exact manifest of all the artifacts and their versions that were compiled into thecabalexecutable.See also #879 (comment)
PS: Btw, while iirc we do install the
licence-filesdeclared in the.cabalfile (which can be more than a single file btw), we don't record their install-location in registration data passed toghc-pkg; so iirc we have no reliable way to locate thelicence-filesfor installed Haskell packages, which is a bit sub-optimal. iirc that's a problem @ekmett was struggling with when he wrote his tool.23Skidoo commentedon Nov 13, 2017
Yep, generating a text (reST/Markdown/...) file is what I had in mind.
Mikolaj commentedon Aug 27, 2021
How far is #879 (comment) from solving this issue (using an external tool)?