From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Soo Subject: Haskell dependencies for custom cabal builds Date: Mon, 11 Feb 2019 08:37:19 -0800 Message-ID: Mime-Version: 1.0 (1.0) Content-Type: multipart/alternative; boundary=Apple-Mail-0F80807B-FCBB-434F-A20D-945B3D1025C7 Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([209.51.188.92]:47362) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gtEaK-00067H-5n for guix-devel@gnu.org; Mon, 11 Feb 2019 11:37:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gtEaF-0005qU-21 for guix-devel@gnu.org; Mon, 11 Feb 2019 11:37:31 -0500 Received: from mail-pl1-x643.google.com ([2607:f8b0:4864:20::643]:46928) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gtEaD-0005oU-4G for guix-devel@gnu.org; Mon, 11 Feb 2019 11:37:25 -0500 Received: by mail-pl1-x643.google.com with SMTP id o6so5520226pls.13 for ; Mon, 11 Feb 2019 08:37:23 -0800 (PST) Received: from ?IPv6:2600:1700:83b0:8bd0:416:9e68:11e2:88ed? ([2600:1700:83b0:8bd0:416:9e68:11e2:88ed]) by smtp.gmail.com with ESMTPSA id v14sm9975103pfn.130.2019.02.11.08.37.20 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Feb 2019 08:37:21 -0800 (PST) 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: guix-devel@gnu.org --Apple-Mail-0F80807B-FCBB-434F-A20D-945B3D1025C7 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Guix, I=E2=80=99ve been working on some Haskell packages and got stuck recently an= d I didn=E2=80=99t know why until I realized the cabal files have `build-typ= e: Custom` (http://hackage.haskell.org/package/termonad-1.1.0.0/termonad.cab= al). I always get missing dependencies even though I have the dependencies l= isted in `inputs` (haskell-gi-base and friends in the example above). What d= o I need to do to fix this? Thanks! John= --Apple-Mail-0F80807B-FCBB-434F-A20D-945B3D1025C7 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Guix,

I=E2=80=99ve been working on some Haskell packages and got stuck rec= ently and I didn=E2=80=99t know why until I realized the cabal files have `b= uild-type: Custom` (http://hackage.haskell.org/package/termonad-1.1.0.0/t= ermonad.cabal). I always get missing dependencies even though I have the= dependencies listed in `inputs` (haskell-gi-base and friends in the example= above). What do I need to do to fix this?

Thanks!<= /div>

John
= --Apple-Mail-0F80807B-FCBB-434F-A20D-945B3D1025C7-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Timothy Sample Subject: Re: Haskell dependencies for custom cabal builds Date: Mon, 11 Feb 2019 15:19:39 -0500 Message-ID: <87imxqaxic.fsf@ngyro.com> References: Mime-Version: 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]:46315) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gtI47-0005eA-2B for guix-devel@gnu.org; Mon, 11 Feb 2019 15:20:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gtI3M-00034S-Hz for guix-devel@gnu.org; Mon, 11 Feb 2019 15:19:45 -0500 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:34541) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gtI3L-00032b-M0 for guix-devel@gnu.org; Mon, 11 Feb 2019 15:19:44 -0500 In-Reply-To: (John Soo's message of "Mon, 11 Feb 2019 08:37:19 -0800") 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: John Soo Cc: guix-devel@gnu.org Hi John, John Soo writes: > Hi Guix, > > I=E2=80=99ve been working on some Haskell packages and got stuck recently= and I didn=E2=80=99t know why until I realized the cabal files have `build= -type: Custom` > (http://hackage.haskell.org/package/termonad-1.1.0.0/termonad.cabal). I a= lways get missing dependencies even though I have the dependencies listed i= n `inputs` (haskell-gi-base and > friends in the example above). What do I need to do to fix this? You might be able to take some inspiration from git-annex, which I believe has the same problem. In short, the issue is that the haskell-build-system unsets =E2=80=9CGHC_PACKAGE_PATH=E2=80=9D before calling =E2=80=9Crunhaskell Setup= .hs=E2=80=9D. This is because it assumes that =E2=80=9CSetup.hs=E2=80=9D will use Cabal in a pret= ty direct way, and that Cabal will setup the required packages from the command line (Cabal complains if you try to use =E2=80=9CGHC_PACKAGE_PATH=E2=80=9D,= because it wants to be in control of the environment). If the custom build code needs dependencies, they will not be available (unless it does what Cabal does and reads package paths from the command line and sets everything up from within Haskell). For git-annex, I was able to skirt the problem. I don=E2=80=99t know how to solve it. If you keep =E2=80=9CGHC_PACKAGE_PATH=E2=80=9D set, the Cabal pa= rt of the build will likely complain. However, without it, the custom part of the build can=E2=80=99t find its dependencies. That=E2=80=99s about all I can recall right now. I hope that helps at leas= t a little bit! :) -- Tim From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Soo Subject: Re: Haskell dependencies for custom cabal builds Date: Mon, 11 Feb 2019 13:56:51 -0800 Message-ID: References: <87imxqaxic.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]:43497) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gtJZT-0007N9-0b for guix-devel@gnu.org; Mon, 11 Feb 2019 16:57:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gtJZQ-0008T4-SY for guix-devel@gnu.org; Mon, 11 Feb 2019 16:56:58 -0500 Received: from mail-ot1-x341.google.com ([2607:f8b0:4864:20::341]:37074) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gtJZQ-0008Qo-9P for guix-devel@gnu.org; Mon, 11 Feb 2019 16:56:56 -0500 Received: by mail-ot1-x341.google.com with SMTP id b3so883779otp.4 for ; Mon, 11 Feb 2019 13:56:55 -0800 (PST) In-Reply-To: <87imxqaxic.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, I=E2=80=99ll check out git-annex as a start. Custom Cabal builds would be a n= ice feature to add to the haskell-build-system. Would it be sufficient to ad= d some extra argument to the build system? Best, John > On Feb 11, 2019, at 12:19 PM, Timothy Sample wrote: >=20 > Hi John, >=20 > John Soo writes: >=20 >> Hi Guix, >>=20 >> I=E2=80=99ve been working on some Haskell packages and got stuck recently= and I didn=E2=80=99t know why until I realized the cabal files have `build-= type: Custom` >> (http://hackage.haskell.org/package/termonad-1.1.0.0/termonad.cabal). I a= lways get missing dependencies even though I have the dependencies listed in= `inputs` (haskell-gi-base and >> friends in the example above). What do I need to do to fix this? >=20 > You might be able to take some inspiration from git-annex, which I > believe has the same problem. >=20 > In short, the issue is that the haskell-build-system unsets > =E2=80=9CGHC_PACKAGE_PATH=E2=80=9D before calling =E2=80=9Crunhaskell Setu= p.hs=E2=80=9D. This is > because it assumes that =E2=80=9CSetup.hs=E2=80=9D will use Cabal in a pre= tty direct > way, and that Cabal will setup the required packages from the command > line (Cabal complains if you try to use =E2=80=9CGHC_PACKAGE_PATH=E2=80=9D= , because it > wants to be in control of the environment). If the custom build code > needs dependencies, they will not be available (unless it does what > Cabal does and reads package paths from the command line and sets > everything up from within Haskell). >=20 > For git-annex, I was able to skirt the problem. I don=E2=80=99t know how t= o > solve it. If you keep =E2=80=9CGHC_PACKAGE_PATH=E2=80=9D set, the Cabal p= art of the > build will likely complain. However, without it, the custom part of the > build can=E2=80=99t find its dependencies. >=20 > That=E2=80=99s about all I can recall right now. I hope that helps at lea= st a > little bit! :) >=20 >=20 > -- Tim From mboxrd@z Thu Jan 1 00:00:00 1970 From: Timothy Sample Subject: Re: Haskell dependencies for custom cabal builds Date: Tue, 12 Feb 2019 11:06:18 -0500 Message-ID: <87r2cd9ekl.fsf@ngyro.com> References: <87imxqaxic.fsf@ngyro.com> Mime-Version: 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]:58696) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gtaiw-0004xl-Pf for guix-devel@gnu.org; Tue, 12 Feb 2019 11:15:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gtaa8-0000HR-OP for guix-devel@gnu.org; Tue, 12 Feb 2019 11:06:52 -0500 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:60109) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gtaZu-00089W-26 for guix-devel@gnu.org; Tue, 12 Feb 2019 11:06:38 -0500 In-Reply-To: (John Soo's message of "Mon, 11 Feb 2019 13:56:51 -0800") 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: John Soo Cc: guix-devel@gnu.org Hi John, John Soo writes: > I=E2=80=99ll check out git-annex as a start. Custom Cabal builds would be= a > nice feature to add to the haskell-build-system. Would it be > sufficient to add some extra argument to the build system? At this point, I don=E2=80=99t know what the argument would do. :) The solution I came up with for git-annex only works for git-annex. I had to carefully read the build code, and carve out certain parts so that they could run in different environments. It is not something that could be enabled by an argument. The only idea I have would be switching from using =E2=80=9Crunhaskell Setu= p.hs=E2=80=9D to using the =E2=80=9Ccabal=E2=80=9D executable. Hopefully, Cabal would se= t up the GHC package database before running the custom code. If it worked, it could be enabled by a build-system argument. I=E2=80=99m definitely just guessing here, though. If you wanted to test this, you could copy out code from =E2=80=9Cguix/build/haskell-build-system.scm=E2=80=9D into custom phases in= your package. If it proves useful, we could adapt it into the build system. So far, custom builds have been extremely rare, so these issues are not very well explored. -- Tim 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 08:50:32 -0800 Message-ID: <6E48CD3A-9511-4855-8C0D-DC7574546939@asu.edu> References: <87imxqaxic.fsf@ngyro.com> <87r2cd9ekl.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]:40954) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gtbGk-0007zE-0o for guix-devel@gnu.org; Tue, 12 Feb 2019 11:50:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gtbGa-0000RY-61 for guix-devel@gnu.org; Tue, 12 Feb 2019 11:50:43 -0500 Received: from mail-pg1-x532.google.com ([2607:f8b0:4864:20::532]:38352) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gtbGX-0000Oz-C3 for guix-devel@gnu.org; Tue, 12 Feb 2019 11:50:37 -0500 Received: by mail-pg1-x532.google.com with SMTP id g189so1511673pgc.5 for ; Tue, 12 Feb 2019 08:50:36 -0800 (PST) In-Reply-To: <87r2cd9ekl.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 Hi there, 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 ass= ume it does this because runhaskell supports many Haskell compilers. If cust= om 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 th= e command? Thanks, John > On Feb 12, 2019, at 8:06 AM, Timothy Sample wrote: >=20 > Hi John, >=20 > John Soo writes: >=20 >> I=E2=80=99ll check out git-annex as a start. Custom Cabal builds would be= a >> nice feature to add to the haskell-build-system. Would it be >> sufficient to add some extra argument to the build system? >=20 > At this point, I don=E2=80=99t know what the argument would do. :) >=20 > The solution I came up with for git-annex only works for git-annex. I > had to carefully read the build code, and carve out certain parts so > that they could run in different environments. It is not something that > could be enabled by an argument. >=20 > The only idea I have would be switching from using =E2=80=9Crunhaskell Set= up.hs=E2=80=9D > to using the =E2=80=9Ccabal=E2=80=9D executable. Hopefully, Cabal would s= et up the GHC > package database before running the custom code. If it worked, it could > be enabled by a build-system argument. I=E2=80=99m definitely just guessi= ng > here, though. If you wanted to test this, you could copy out code from > =E2=80=9Cguix/build/haskell-build-system.scm=E2=80=9D into custom phases i= n your > package. If it proves useful, we could adapt it into the build system. >=20 > So far, custom builds have been extremely rare, so these issues are not > very well explored. >=20 >=20 > -- Tim From mboxrd@z Thu Jan 1 00:00:00 1970 From: Timothy Sample Subject: Re: Haskell dependencies for custom cabal builds Date: Tue, 12 Feb 2019 14:18:40 -0500 Message-ID: <87imxoak8f.fsf@ngyro.com> References: <87imxqaxic.fsf@ngyro.com> <87r2cd9ekl.fsf@ngyro.com> <6E48CD3A-9511-4855-8C0D-DC7574546939@asu.edu> Mime-Version: 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]:54882) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gtdZy-0002tz-3C for guix-devel@gnu.org; Tue, 12 Feb 2019 14:18:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gtdZx-0008VC-5D for guix-devel@gnu.org; Tue, 12 Feb 2019 14:18:50 -0500 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:39141) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gtdZw-0008Ri-Pw for guix-devel@gnu.org; Tue, 12 Feb 2019 14:18:49 -0500 In-Reply-To: <6E48CD3A-9511-4855-8C0D-DC7574546939@asu.edu> (John Soo's message of "Tue, 12 Feb 2019 08:50:32 -0800") 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: John Soo Cc: guix-devel@gnu.org Hi John, John Soo writes: > Hi there, > > 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? I don=E2=80=99t see how this would help. >From the build system code, Cabal errors if GHC_PACKAGE_PATH is set during 'configure', so unset and restore it. 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 pr= operly, 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. I don=E2=80=99t think that switching from =E2=80=9Crunhaskell=E2=80=9D to = =E2=80=9Crunghc=E2=80=9D changes that. -- Tim From mboxrd@z Thu Jan 1 00:00:00 1970 From: Timothy Sample Subject: Re: Haskell dependencies for custom cabal builds Date: Tue, 12 Feb 2019 14:21:40 -0500 Message-ID: <878sykg6d7.fsf@ngyro.com> References: <87imxqaxic.fsf@ngyro.com> <87r2cd9ekl.fsf@ngyro.com> <6E48CD3A-9511-4855-8C0D-DC7574546939@asu.edu> Mime-Version: 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]:56233) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gtdd1-0005Yu-Ls for guix-devel@gnu.org; Tue, 12 Feb 2019 14:22:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gtdd0-0004BP-77 for guix-devel@gnu.org; Tue, 12 Feb 2019 14:21:59 -0500 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:60059) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gtdcz-0003nL-Sn for guix-devel@gnu.org; Tue, 12 Feb 2019 14:21:58 -0500 In-Reply-To: <6E48CD3A-9511-4855-8C0D-DC7574546939@asu.edu> (John Soo's message of "Tue, 12 Feb 2019 08:50:32 -0800") 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: John Soo Cc: guix-devel@gnu.org Hi John, John Soo writes: > Hi there, > > 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? I don=E2=80=99t see how this would help. >From the build system code, Cabal errors if GHC_PACKAGE_PATH is set during 'configure', so unset and restore it. 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 pr= operly, 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. I don=E2=80=99t think that switching from =E2=80=9Crunhaskell=E2=80=9D to = =E2=80=9Crunghc=E2=80=9D changes that. -- Tim From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marius Bakke Subject: Re: Haskell dependencies for custom cabal builds Date: Tue, 12 Feb 2019 20:44:42 +0100 Message-ID: <87bm3giyfp.fsf@fastmail.com> References: <87imxqaxic.fsf@ngyro.com> <87r2cd9ekl.fsf@ngyro.com> <6E48CD3A-9511-4855-8C0D-DC7574546939@asu.edu> <878sykg6d7.fsf@ngyro.com> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([209.51.188.92]:35745) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gte5B-00046A-BG for guix-devel@gnu.org; Tue, 12 Feb 2019 14:51:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gtdz9-0003E2-NU for guix-devel@gnu.org; Tue, 12 Feb 2019 14:44:52 -0500 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:49077) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gtdz8-0003BF-Qm for guix-devel@gnu.org; Tue, 12 Feb 2019 14:44:51 -0500 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 , John Soo Cc: guix-devel@gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello! Timothy Sample writes: > Hi John, > > John Soo writes: > >> Hi there, >> >> 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? > > I don=E2=80=99t see how this would help. > > From the build system code, > > Cabal errors if GHC_PACKAGE_PATH is set during 'configure', so unset > and restore it. > > 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 = properly, 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, Caba= l 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. FWIW here is the upstream issue: Note that it was "fixed" briefly by these commits: Unfortunately it was later reverted due to breaking some edge(?) cases, and a Nix-specific workaround that I don't really understand was merged: I wonder if we should try picking the original Cabal fix from ttuegel, maybe as a separate package if it really is a breaking change. Thoughts? --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAlxjIioACgkQoqBt8qM6 VPr2YAf/Uy7cY/Sh7yxmS46oVGMUqrlfvcSRT2/lYJ5QppH4aPIdg+6YJJAvoQ+n Qjqq2+/p5s1vs60/WQOhDZhafjrA+1sQCf4jv3rz/F5oyUB7uf7wgAM/kSr4TF6F ebnlHsuiIgEf9kaeddSFTYl8ebkZZjl8O+UDnCny8qqXp6A+IDUbV4RQu6o4ATVn cZGrpn5XMTVg/vQIyMV3flg7eqv+eILeuX/ujzpPc1wYkRnNPm3RbIr+fdl7/GPO 6elQUzaaMdSrUDrPex/Nq20wTJpW4a0pwiIKlQAbNrm5qOKV49dsO2YxFkHTAUpH Teot4W9V0/Bm4BYoE6dJ4Fd/694tHA== =WZRc -----END PGP SIGNATURE----- --=-=-=-- 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 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 16:02:44 -0800 Message-ID: References: <87imxqaxic.fsf@ngyro.com> <87r2cd9ekl.fsf@ngyro.com> <6E48CD3A-9511-4855-8C0D-DC7574546939@asu.edu> <878sykg6d7.fsf@ngyro.com> <87bm3giyfp.fsf@fastmail.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]:44533) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gti4z-00028w-0c for guix-devel@gnu.org; Tue, 12 Feb 2019 19:07:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gti0q-0004xl-Vb for guix-devel@gnu.org; Tue, 12 Feb 2019 19:02:54 -0500 Received: from mail-pg1-x529.google.com ([2607:f8b0:4864:20::529]:38246) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gti0q-0004vP-1M for guix-devel@gnu.org; Tue, 12 Feb 2019 19:02:52 -0500 Received: by mail-pg1-x529.google.com with SMTP id g189so244009pgc.5 for ; Tue, 12 Feb 2019 16:02:51 -0800 (PST) In-Reply-To: <87bm3giyfp.fsf@fastmail.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: Marius Bakke Cc: guix-devel@gnu.org Thanks Marius, I=E2=80=99m feeling quite out of my depth here so thanks for the background.= It seems like maintaining a fork effectively might be a lot more work. Is t= here really no other good way to accomplish a custom build? John > On Feb 12, 2019, at 11:44 AM, Marius Bakke wrote: >=20 > Hello! >=20 > Timothy Sample writes: >=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, Caba= l 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 > FWIW here is the upstream issue: >=20 > >=20 > Note that it was "fixed" briefly by these commits: >=20 > >=20 > Unfortunately it was later reverted due to breaking some edge(?) cases, > and a Nix-specific workaround that I don't really understand was merged: >=20 > >=20 > I wonder if we should try picking the original Cabal fix from ttuegel, > maybe as a separate package if it really is a breaking change. Thoughts?