From mboxrd@z Thu Jan 1 00:00:00 1970 From: Federico Beffa Subject: Re: [PATCH] build-system: Add haskell-build-system. Date: Sun, 29 Mar 2015 16:45:38 +0200 Message-ID: References: <87wq1zyl2z.fsf@gnu.org> <877ftz52eq.fsf@mango.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54659) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YcET6-00047x-Q4 for guix-devel@gnu.org; Sun, 29 Mar 2015 10:45:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YcET5-0004cF-LN for guix-devel@gnu.org; Sun, 29 Mar 2015 10:45:40 -0400 In-Reply-To: <877ftz52eq.fsf@mango.localdomain> 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-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Ricardo Wurmus Cc: Guix-devel On Sun, Mar 29, 2015 at 4:00 PM, Ricardo Wurmus wrote: > > Ludovic Court=C3=A8s writes: > >> Isn=E2=80=99t there any environment variable akin to LD_LIBRARY_PATH or >> GUILE_LOAD_PATH? That would greatly simplify things. > > There is the GHC_PACKAGE_PATH environment variable which is supposed to > be a colon-separated list of package databases. > > See section 4.9.5.1 in the latest GHC user guide. > https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/packages.= html There are a couple of considerations about this: * All Hackage packages are based on Cabal, not the GHC specific tools. If GHC_PACKAGE_PATH is set, running the configure phase "runhaskell Setup.hs configure" will stop with a message saying that Cabal is not compatible with the use of this variable. NixOS does the same: in the build phase they explicitly unset GHC_PACKAGE_PATH and build a temporary database: https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/haskell-modul= es/generic-builder.nix * AFAIU the directories listed in GHC_PACKAGE_PATH must still include a database cache named 'package.cache' (section 4.9.5 of the GHC manual). Therefore, the fix file name would clash in profiles and prevent the use of libraries in profiles. Having never used nixpkgs, I'm not sure how they handle the database in profiles. Would you have a pointer to a "standard" mechanism (like how they handle 'dir' files, icon caches, ...). Regards, Fede