How to port a Haskell project that doesn't use cabal, and uses stack instead?
Gleb Popov
arrowd at freebsd.org
Thu Feb 27 08:47:03 UTC 2020
On Wed, Feb 26, 2020 at 7:59 AM Yuri <yuri at rawbw.com> wrote:
> On 2020-02-24 23:37, Gleb Popov wrote:
>
> 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.
>
>
> It needs a bundled project:
>
> cabal: Could not resolve dependencies:
> [__0] trying: alchemy-0.1.0 (user goal)
> [__1] unknown package: lol-cpp (dependency of alchemy)
>
>
> However, adding
> GH_TUPLE=cpeikert:Lol:60d7b3d38fc4279a60d6932a433ed2e4c22cc287 doesn't help
> because it doesn't get extracted when USES=cabal:hpack is present for some
> reason.
>
>
> Also, the same tarball is listed twice in distinfo:
>
> SHA256 (cabal/alchemy-g20200223.tar.gz) =
> 8f00114a75e57f7302237fd7664a9192e9cd6d8510f91bc119ea6e5fcd5a09e0
> SIZE (cabal/alchemy-g20200223.tar.gz) = 41624
> SHA256 (cabal/cpeikert-ALCHEMY-g20200223-76b9fd7_GH0.tar.gz) =
> 8f00114a75e57f7302237fd7664a9192e9cd6d8510f91bc119ea6e5fcd5a09e0
> SIZE (cabal/cpeikert-ALCHEMY-g20200223-76b9fd7_GH0.tar.gz) = 41624
>
>
> Yuri
>
>
>
> PORTNAME= alchemy
> PORTVERSION= g20200223
> CATEGORIES= security haskell
>
> MAINTAINER= yuri at FreeBSD.org
> COMMENT= X
>
> LICENSE= BSD3CLAUSE
>
> USES= cabal:hpack
> USE_GITHUB= yes
> GH_ACCOUNT= cpeikert
> GH_PROJECT= ALCHEMY
> GH_TAGNAME= 76b9fd7
> #GH_TUPLE= cpeikert:Lol:60d7b3d38fc4279a60d6932a433ed2e4c22cc287
>
> EXECUTABLES= alchemy-homomrlwr
>
> .include <bsd.port.mk>
>
>
After adding USES=cabal:hpack you have to follow usual procedure for
generating USE_CABAL (make cabal-extract-deps, make make-use-cabal, etc.)
More information about the freebsd-haskell
mailing list