packages feed

cabal-dependency-licenses 0.1.2.0 → 0.2.0.0

raw patch · 3 files changed

+14/−5 lines, 3 filesdep ~directory

Dependency ranges changed: directory

Files

CHANGELOG view
@@ -1,3 +1,7 @@+- 0.2.0.0+    * Allow use with directory-1.3+    * Include synopsis of dependencies for lawyers+ - 0.1.2.0     * Allow use with Cabal >= 1.24 
cabal-dependency-licenses.cabal view
@@ -1,5 +1,5 @@ Name:     cabal-dependency-licenses-Version:  0.1.2.0+Version:  0.2.0.0 Synopsis: Compose a list of a project's transitive dependencies with their licenses  Description:@@ -27,7 +27,7 @@     Cabal      >= 1.18 && < 1.25,     containers >= 0.5  && < 0.6,     base       >= 4    && < 5,-    directory  >= 1.2  && < 1.3,+    directory  >= 1.2  && < 1.4,     filepath   >= 1.3  && < 1.5  Source-repository head
src/Main.hs view
@@ -7,8 +7,9 @@  -------------------------------------------------------------------------------- import           Control.Monad                      (forM_, unless)-import           Data.List                          (foldl', sort)+import           Data.List                          (foldl', sortBy) import           Data.Maybe                         (catMaybes)+import           Data.Ord                           (comparing) import           Data.Set                           (Set) import qualified Data.Set                           as Set import           Distribution.InstalledPackageInfo  (InstalledPackageInfo)@@ -114,12 +115,16 @@         putStrLn $ "# " ++ Cabal.display license         putStrLn "" -        let sortedNames = sort $ map getName ipis-        forM_ sortedNames $ \name -> putStrLn $ "- " ++ name+        let sorted = sortBy (comparing getName) ipis+        forM_ sorted $ \ipi -> do+            let synopsis = getSynopsis ipi+            putStrLn $ "- " ++ getName ipi ++ " (" ++ synopsis ++ ")"         putStrLn ""   where     getName =         Cabal.display . Cabal.pkgName . InstalledPackageInfo.sourcePackageId++    getSynopsis = InstalledPackageInfo.synopsis   --------------------------------------------------------------------------------