unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Federico Beffa <beffa@ieee.org>
To: Ricardo Wurmus <rekado@elephly.net>
Cc: Guix-devel <guix-devel@gnu.org>
Subject: Re: [PATCH] build-system: Add haskell-build-system.
Date: Sun, 29 Mar 2015 16:45:38 +0200	[thread overview]
Message-ID: <CAKrPhPOrEZfS2aBtKGudOhf3R3juH=rdZcCkhjK+x0VZxAgRgQ@mail.gmail.com> (raw)
In-Reply-To: <877ftz52eq.fsf@mango.localdomain>

On Sun, Mar 29, 2015 at 4:00 PM, Ricardo Wurmus <rekado@elephly.net> wrote:
>
> Ludovic Courtès writes:
>
>> Isn’t 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-modules/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

  reply	other threads:[~2015-03-29 14:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-27  8:59 [PATCH] build-system: Add haskell-build-system Federico Beffa
2015-03-29 13:44 ` Ludovic Courtès
2015-03-29 14:00   ` Ricardo Wurmus
2015-03-29 14:45     ` Federico Beffa [this message]
2015-03-30  8:16       ` Ludovic Courtès
2015-03-30 16:48         ` Federico Beffa
2015-04-02 21:31           ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAKrPhPOrEZfS2aBtKGudOhf3R3juH=rdZcCkhjK+x0VZxAgRgQ@mail.gmail.com' \
    --to=beffa@ieee.org \
    --cc=guix-devel@gnu.org \
    --cc=rekado@elephly.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).