From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Soo Subject: Re: Haskell dependencies for custom cabal builds Date: Tue, 12 Feb 2019 11:37:30 -0800 Message-ID: References: <87imxqaxic.fsf@ngyro.com> <87r2cd9ekl.fsf@ngyro.com> <6E48CD3A-9511-4855-8C0D-DC7574546939@asu.edu> <878sykg6d7.fsf@ngyro.com> Mime-Version: 1.0 (1.0) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([209.51.188.92]:36193) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gte5b-0004Fi-0A for guix-devel@gnu.org; Tue, 12 Feb 2019 14:51:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gtdsX-0003jG-28 for guix-devel@gnu.org; Tue, 12 Feb 2019 14:38:02 -0500 Received: from mail-pg1-x533.google.com ([2607:f8b0:4864:20::533]:38678) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gtdsT-0003EF-88 for guix-devel@gnu.org; Tue, 12 Feb 2019 14:37:59 -0500 Received: by mail-pg1-x533.google.com with SMTP id g189so1717842pgc.5 for ; Tue, 12 Feb 2019 11:37:33 -0800 (PST) In-Reply-To: <878sykg6d7.fsf@ngyro.com> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Timothy Sample Cc: guix-devel@gnu.org Thanks Tim! Good to know! Thank you. Looking again at the call to runhaskell in the conf= igure phase, then. It does accept --package-db as an argument. Is it feasib= le to parse GHC_PACKAGE_PATH into the correct package paths instead of using= the environment variable? Thanks! John > On Feb 12, 2019, at 11:21 AM, Timothy Sample wrote: >=20 > Hi John, >=20 > John Soo writes: >=20 >> Hi there, >>=20 >> I did a little digging this morning and it seems like runhaskell is >> probably deprecated in favor of runghc. Do we expect anyone to be >> using hugs or jhc? Runghc also supports ghc flags. I still need to do >> some more research here but the Haskell configure phase deliberately >> unsets GHC_PACKAGE_PATH. I assume it does this because runhaskell >> supports many Haskell compilers. If custom cabal builds are rare, I >> would suspect that non-ghc builds are even rarer. Would it be possible >> to replace runhaskell with runghc? Or parameterize the command? >=20 > I don=E2=80=99t see how this would help. >=20 > =46rom the build system code, >=20 > Cabal errors if GHC_PACKAGE_PATH is set during 'configure', so unset > and restore it. >=20 > The issue that git-annex has is that it wants to use some packages > before calling into Cabal. If =E2=80=9CGHC_PACKAGE_PATH=E2=80=9D is set p= roperly, it > will find the packages, proceed normally until calling Cabal, and then > error because Cabal doesn=E2=80=99t like =E2=80=9CGHC_PACKAGE_PATH=E2=80=9D= . Cabal wants to > setup the package search path from the command line arguments instead. > On the other hand, if =E2=80=9CGHC_PACKAGE_PATH=E2=80=9D is not set, Cabal= would > theoretically work, but we never get there! The custom =E2=80=9CSetup.hs=E2= =80=9D code > errors out with missing packages before ever calling Cabal. >=20 > I don=E2=80=99t think that switching from =E2=80=9Crunhaskell=E2=80=9D to =E2= =80=9Crunghc=E2=80=9D changes that. >=20 >=20 > -- Tim