guix_mirror_bot pushed a commit to branch haskell-team
in repository guix.
commit 061631883d561dc93a5d860ca13d5b8fd4a79ffa
Author: Saku Laesvuori <[email protected]>
AuthorDate: Sat Oct 18 15:10:34 2025 +0300
gnu: ghc-generic-lens: Fix tests
* gnu/packages/haskell-xyz.scm (ghc-generic-lens)[arguments]: Run
doctests with GHC_PACKAGE_PATH.
Change-Id: Id8d03d77489a6da9efc5cc1a951df864654607b3
Signed-off-by: Andreas Enge <[email protected]>
---
gnu/packages/haskell-xyz.scm | 20 ++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm
index 41bf80108f..c1a4a049b4 100644
--- a/gnu/packages/haskell-xyz.scm
+++ b/gnu/packages/haskell-xyz.scm
@@ -6782,8 +6782,24 @@ is the shared internal logic of the @code{generic-lens}
and
ghc-doctest
ghc-lens))
(arguments
- `(#:cabal-revision ("1"
-
"0ib9848rh56v0dc1giiax2zi2w7is6ahb2cj6ry3p0hwapfd3p49")))
+ (list
+ #:cabal-revision '("1"
+
"0ib9848rh56v0dc1giiax2zi2w7is6ahb2cj6ry3p0hwapfd3p49")
+ #:phases
+ #~ (modify-phases %standard-phases
+ ;; The doctests require GHC_PACKAGE_PATH but Setup.hs fails
+ ;; if it is defined, so we run them separately
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (if tests?
+ (let* ((tmpdir (or (getenv "TMP") "/tmp"))
+ (package-db (string-append tmpdir "/package.conf.d")))
+ (invoke "runhaskell" "Setup.hs" "test" "inspection-tests"
+ "generic-lens-syb-tree" "generic-lens-bifunctor")
+ (setenv "GHC_PACKAGE_PATH" package-db)
+ (invoke "./dist/build/doctests/doctests")
+ (unsetenv "GHC_PACKAGE_PATH"))
+ (format #t "Testsuite not run.%~")))))))
(home-page "https://github.com/kcsongor/generic-lens")
(synopsis "Generically derive traversals, lenses and prisms")
(description