[arch-haskell] Re: cabal2arch, Hackage libraries and the "haskell-" pkgname prefix

Don Stewart dons at galois.com
Sun Jun 6 17:13:12 EDT 2010


xyne:
> Hi,
> 
> Bauerbill uses the package list located at the following address to
> construct a database of Hackage packages:
> 
> http://hackage.haskell.org/packages/archive/pkg-list.html
> 
> As I've understood the guidelines, all library packages include the
> "haskell-" prefix whereas stand-alone applications do not.
> 
> A user recently reported an error while trying to build Pandoc from
> Hackage using Bauerbill. The problem seems to be that the
> aforementioned list describes Pandoc only as "programs", which causes
> Bauerbill to regard it as a stand-alone app.* Cabal2arch, however, is
> able to correctly determine that it includes libraries and should thus
> be named "haskell-pandoc".
> 
> 
> 
> Can anyone on this list (Dons?) correct the package list?
> 
> What is the best way to detect that a package contains libraries? I
> haven't looked at cabal2arch's source code but presumably it gleans
> such information from the .cabal file. I could update Bauerbill to do
> the same but having a global list is much more useful when managing
> multiple packages. Is the Hackage package list not generally reliable
> for this purpose?

The policy cabal2arch uses is:

    isLibrary  = isJust (library cabal)
                        && map toLower (display name) `notElem` shouldNotBeLibraries

That is, if the .cabal file contains a 'library' stanza, we treat it as
a library, but with the following exceptions for *well known
exectuables*:

    shouldNotBeLibraries :: [String]
    shouldNotBeLibraries =
        ["xmonad"
        ,"gitit"
        ,"l-seed"
        ,"hspresent"
        ,"haskell-platform"
        ,"xmonad-contrib"
        ,"lambdabot"
        ,"piet"
        ,"hsffig"
        ,"yi"
        ,"haddock"
        ,"hscolour"
        ,"line2pdf"
        ,"distract"
        ,"derive"
        ,"Hedi"
        ,"conjure"
        ,"clevercss"
        ,"cpphs"
        ,"backdropper"
        ,"darcs-beta"
        ,"gtk2hs"
        ,"darcs"
        ,"greencard"

    -- the pandoc package doesnt' ship haskell-pandoc
    --    ,"pandoc"

        ,"pugs-drift"
        ,"wol"
        ,"timepiece"
        ,"hledger"
        ,"hp2any-graph"
        ,"hp2any-manager"
        ]


So people looking for, e.g. gitit, find it in the gitit package, even when it
installs additional support libraries.


More information about the arch-haskell mailing list