all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Oleg Pykhalov <go.wigust@gmail.com>
To: William <wonko7@gmail.com>
Cc: help-guix@gnu.org
Subject: Re: xmonad, xmonad-contrib & GHC_PACKAGE_PATH?
Date: Wed, 21 Apr 2021 07:00:16 +0300	[thread overview]
Message-ID: <878s5cmgmn.fsf@gmail.com> (raw)
In-Reply-To: <CAFBkDVvjUzXF0gY96aeeOQT0CG-5ZCsqG_=gUBctG0VT7PW1uQ@mail.gmail.com> (William's message of "Tue, 20 Apr 2021 09:47:41 +0200")

[-- Attachment #1: Type: text/plain, Size: 1996 bytes --]

Hi,

William <wonko7@gmail.com> writes:

> Do I need to fix a ghc version in my manifest? how do I find out which
> ghc xmonad used? If I need other libs (ghc-hostname for example) how
> do I specify one that's compiled with the same ghc?

All haskell packages use haskell-build-system as a build-system.

From guix/build-system/haskell.scm file:
--8<---------------cut here---------------start------------->8---
(define (default-haskell)
  "Return the default Haskell package."
  ;; Lazily resolve the binding to avoid a circular dependency.
  (let ((haskell (resolve-interface '(gnu packages haskell))))
    (module-ref haskell 'ghc)))
--8<---------------cut here---------------end--------------->8---

If you try to evaluate this, you need 8.6.5:
--8<---------------cut here---------------start------------->8---
oleg@guixsd ~$ guix build -e "(let ((haskell (resolve-interface '(gnu packages haskell)))) (module-ref haskell 'ghc))"
/gnu/store/49567qgp72hb67w3y9x892ib1yz6nk8h-ghc-8.6.5-doc
/gnu/store/wkhglgmlz28kpkd3ky7f3kfjkxmvyb10-ghc-8.6.5
--8<---------------cut here---------------end--------------->8---

But default ghc is latest version:
--8<---------------cut here---------------start------------->8---
oleg@guixsd ~$ guix build ghc
123.7 MB will be downloaded:
   /gnu/store/mrgww5amm1z29snrsmfgvrbbv584zsxk-ghc-8.8.3-doc
   /gnu/store/gsgmw9iilvfqwixjl86gbmxyy7xapkxh-ghc-8.8.3
...
--8<---------------cut here---------------end--------------->8---

In you manifest (specifications->manifest '("ghc@8.6" ...)) or better
don't use specifications->manifest at all for this, because it will
break on upgrade after packages will be upgraded to new haskell.

Better use packages->manifest for this:
--8<---------------cut here---------------start------------->8---
(use-modules (gnu)
             (guix profiles))
(use-package-modules haskell)
(packages->manifest (list ghc))
--8<---------------cut here---------------end--------------->8---

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 861 bytes --]

  reply	other threads:[~2021-04-21  4:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-20  7:47 xmonad, xmonad-contrib & GHC_PACKAGE_PATH? William
2021-04-21  4:00 ` Oleg Pykhalov [this message]
2021-04-21  4:20   ` John Soo
2021-04-21  7:06     ` William

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

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

  git send-email \
    --in-reply-to=878s5cmgmn.fsf@gmail.com \
    --to=go.wigust@gmail.com \
    --cc=help-guix@gnu.org \
    --cc=wonko7@gmail.com \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.