cabal-dependency-licenses
cabal-dependency-licenses copied to clipboard
Support projects using stack
I'm hoping that the effort required to support stack
isn't too large, and brings several benefits, particularly protection against license changes between versions of dependencies.
I'm not really sure what you mean by supporting stack
, since that also uses cabal files?
This tool currently doesn't look at license changes, that's an interesting idea though.
Running in a directory containing a Stack project (which has been compiled):
$ stack install cabal-dependency-licenses
$ $(stack path --local-bin)/cabal-dependency-licenses
> cabal-dependency-licenses: Run the 'configure' command first.
Maybe all the required information is there, but the program is making some assumptions about where to find it, such as here? There exists a dist
directory, but it is in .stack-work/dist
, not in the project root. And even .stack-work
can be changed with environment variables, so it should probably not be hard-coded.
I've encountered this too. Even installing cabal-install
and running stack exec cabal -- configure
doesn't work, since stack uses GHC_PACKAGE_PATH, and cabal-install
doesn't like that.
Note that since Stack 1.3.0, there is stack list-dependencies --license
.