cabal-dependency-licenses icon indicating copy to clipboard operation
cabal-dependency-licenses copied to clipboard

Support projects using stack

Open axman6 opened this issue 8 years ago • 4 comments

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.

axman6 avatar Jan 08 '16 00:01 axman6

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.

jaspervdj avatar Jan 31 '16 16:01 jaspervdj

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.

ruuda avatar Sep 07 '16 22:09 ruuda

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.

patrickt avatar May 30 '17 19:05 patrickt

Note that since Stack 1.3.0, there is stack list-dependencies --license.

ruuda avatar May 30 '17 22:05 ruuda