From: John Kehayias via Bug reports for GNU Guix <bug-guix@gnu.org>
To: "48944@debbugs.gnu.org" <48944@debbugs.gnu.org>
Subject: bug#48944: haskell build-system cannot build pcg-random
Date: Wed, 23 Jun 2021 21:54:12 +0000 [thread overview]
Message-ID: <sd-safv5oX13KXDmV1N8l6qL_xv_pAyKZ__39Y5lWT5agc5xRJB8jj_SMkh7h71AvE4lPnMjJ0KZRqwPS7BLfgYlyxIyKfS4aJj1N2Wstd8=@protonmail.com> (raw)
In-Reply-To: <8a77f214-d5f5-417f-8371-558cfa6ae267@www.fastmail.com>
[-- Attachment #1: Type: text/plain, Size: 1057 bytes --]
Hello,
I also see this error for building packages that need cabal-doctest, as the configure step needs the package database. There's actually some packages in guix that already modify the configure step to do this, like ghc-cairo: https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/haskell-xyz.scm#n1465
As noted there, the package database should be passed to runhaskell itself, not just what it runs. This would allow other packages that need a module for configuring to work. Attached is a patch to modify haskell-build-system to do this, though not only for the configure command (seemed easiest to just do that for now). I'm submitting the patch with comments there about possible modifications.
I can confirm with this that pcg-random builds, as well as packages I've been trying that need cabal-doctest (note, I tested using guix's package of cabal-doctest, no need to add that as well).
Comments welcome here, especially as I'm pretty new to Haskell still and guix completely, or on patch submission (sending shortly).
John
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: runhaskell-add-pkgdb.patch --]
[-- Type: text/x-patch; name=runhaskell-add-pkgdb.patch, Size: 904 bytes --]
diff --git a/guix/build/haskell-build-system.scm b/guix/build/haskell-build-system.scm
index 28253ce2f0..be20f13e10 100644
--- a/guix/build/haskell-build-system.scm
+++ b/guix/build/haskell-build-system.scm
@@ -63,13 +63,14 @@
((file-exists? "Setup.lhs")
"Setup.lhs")
(else
- #f))))
+ #f)))
+ (pkgdb (string-append "-package-db=" %tmp-db-dir)))
(if setup-file
(begin
(format #t "running \"runhaskell Setup.hs\" with command ~s \
and parameters ~s~%"
command params)
- (apply invoke "runhaskell" setup-file command params))
+ (apply invoke "runhaskell" pkgdb setup-file command params))
(error "no Setup.hs nor Setup.lhs found"))))
(define* (configure #:key outputs inputs tests? (configure-flags '())
--
2.32.0
next prev parent reply other threads:[~2021-06-23 21:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-10 8:45 bug#48944: haskell build-system cannot build pcg-random Philip Munksgaard
2021-06-10 16:26 ` zimoun
2021-07-01 16:28 ` Philip Munksgaard
2021-06-23 21:54 ` John Kehayias via Bug reports for GNU Guix [this message]
2022-04-06 13:40 ` bug#48944: Philip Munksgaard
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='sd-safv5oX13KXDmV1N8l6qL_xv_pAyKZ__39Y5lWT5agc5xRJB8jj_SMkh7h71AvE4lPnMjJ0KZRqwPS7BLfgYlyxIyKfS4aJj1N2Wstd8=@protonmail.com' \
--to=bug-guix@gnu.org \
--cc=48944@debbugs.gnu.org \
--cc=john.kehayias@protonmail.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.