How to port a Haskell project that doesn't use cabal, and uses stack instead?
Gleb Popov
arrowd at freebsd.org
Tue Feb 25 07:37:33 UTC 2020
On Tue, Feb 25, 2020 at 10:54 AM Yuri <yuri at rawbw.com> wrote:
> On 2020-02-24 02:09, Gleb Popov wrote:
> >
> > This project has "package.yaml" file. It is a file for hpack program,
> > which can be turned into a proper .cabal file. Start with
> >
> > USES=cabal:hpack
> >
> > Other than that, you'll need to add USE_GITHUB=yes to make the
> > distfile fetch from GitHub.
>
>
> It fails:
>
> cabal: Internal error in target matching. It should always be possible
> to find
> a syntax that's sufficiently qualified to give an unambiguous match.
> However
> when matching 'exe:alchemy' we found exe:alchemy (unknown-component) which
> does not have an unambiguous syntax. The possible syntax and the targets
> they
> match are as follows:
> 'exe:alchemy' which matches exe:alchemy (unknown-component),
> :pkg:exe:lib:exe:file:alchemy (unknown-file)
>
According to package.yaml, the only executable provided by the package is
called "alchemy-homomrlwr".
cabal.mk defaults to EXECUTABLES=${PORTNAME}, so you have to override it in
this case.
>
> Yuri
>
>
>
>
> PORTNAME= alchemy
> PORTVERSION= g20200223
> CATEGORIES= security haskell
>
> MAINTAINER= haskell at FreeBSD.org
> COMMENT= X
>
> LICENSE= BSD3CLAUSE
>
> USES= cabal:hpack
> USE_GITHUB= yes
> GH_ACCOUNT= cpeikert
> GH_PROJECT= ALCHEMY
> GH_TAGNAME= 76b9fd7
>
> .include <bsd.port.mk>
>
>
More information about the freebsd-haskell
mailing list