[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: xmonad, xmonad-contrib & GHC_PACKAGE_PATH?
From: |
Oleg Pykhalov |
Subject: |
Re: xmonad, xmonad-contrib & GHC_PACKAGE_PATH? |
Date: |
Wed, 21 Apr 2021 07:00:16 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) |
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---
signature.asc
Description: PGP signature