On Mon, 10 Oct 2011 16:53:29 +0200, Eric Y. Kow <eric.kow@gmail.com> wrote:
Hi all,
I'd like a tool that takes a .cabal file as input and produces a list of all dependencies (recursive, all the way to 'base') and some metadata for each (most importantly, LICENSE)
Does this already exist, or will I to write it myself?
I notice that there's a patch by Trevor Elliot to either Cabal or cabal-install that does something similar [1], and I know that Magnus Therning wrote a little tool that creates a GraphViz graph [2]... so it seems like all the pieces are there already. But is there anything in some sort of ready-to-go just-works state, doing everything including interacting with hackage and sucking down the cabal files it needs, etc?
cab[0] can do that, for installed packages: cab deps -i -r -a vector will generate a list of licenses for vector and the packages it depends upon, like this: base 4.3.1.0 BSD3 "" ghc-prim 0.2.0.0 BSD3 "" rts 1.0 BSD3 "" ffi 1.0 BSD3 "" integer-gmp 0.2.0.3 BSD3 "" ghc-prim 0.2.0.0 BSD3 "" rts 1.0 BSD3 "" ffi 1.0 BSD3 "" rts 1.0 BSD3 "" ffi 1.0 BSD3 "" primitive 0.4.0.1 BSD3 "Roman Leshchinskiy <rl@cse.unsw.edu.au>" base 4.3.1.0 BSD3 "" ghc-prim 0.2.0.0 BSD3 "" rts 1.0 BSD3 "" ffi 1.0 BSD3 "" integer-gmp 0.2.0.3 BSD3 "" ghc-prim 0.2.0.0 BSD3 "" rts 1.0 BSD3 "" ffi 1.0 BSD3 "" rts 1.0 BSD3 "" ffi 1.0 BSD3 "" ghc-prim 0.2.0.0 BSD3 "" rts 1.0 BSD3 "" ffi 1.0 BSD3 "" Regards, Henk-Jan van Tuyl [0] http://hackage.haskell.org/package/cab -- http://Van.Tuyl.eu/ http://members.chello.nl/hjgtuyl/tourdemonad.html --