diff mbox series

[bug#67921,haskell-team,3/3] guix: haskell-build-system: Hide dependecies from ghc's package db

Message ID 6030eebe203e81a45acda76c95bcbfb064ff5e74.1703056111.git.saku@laesvuori.fi
State New
Headers show
Series [bug#67921,haskell-team,1/3] gnu: ghc-next: Update to version 9.4.8 | expand

Commit Message

Saku Laesvuori Dec. 20, 2023, 7:13 a.m. UTC
A Haskell package P contains information about all other haskell
packages P_n it depends on. This commit hides the packages P_n in the
package database stored in P, which enables being explicit about which
haskell packages one wants to be visible in their profile.

* guix/build/haskell-build-system.scm
(register)[install-transitive-deps]: Set the 'exposed' field to False in
the dependencies' .conf files. Remove a comment about symlinking because
the copied files are now modified.

Fixes: https://issues.guix.gnu.org/66347
Change-Id: I66332cd49e6036689873d9435036c9f876216f1b
---
 guix/build/haskell-build-system.scm | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Lars-Dominik Braun Jan. 6, 2024, 6:42 p.m. UTC | #1
Hi,

> A Haskell package P contains information about all other haskell
> packages P_n it depends on. This commit hides the packages P_n in the
> package database stored in P, which enables being explicit about which
> haskell packages one wants to be visible in their profile.

oddly enough this patch causes the 'check phase of ghc-doctest to
not finish/hang. Any idea why?

Cheers,
Lars
Saku Laesvuori Jan. 8, 2024, 7:09 a.m. UTC | #2
> Hi,
> 
> > A Haskell package P contains information about all other haskell
> > packages P_n it depends on. This commit hides the packages P_n in the
> > package database stored in P, which enables being explicit about which
> > haskell packages one wants to be visible in their profile.
> 
> oddly enough this patch causes the 'check phase of ghc-doctest to
> not finish/hang. Any idea why?

No idea, I'll look into it more when I get GHC 9.6 packaged.
diff mbox series

Patch

diff --git a/guix/build/haskell-build-system.scm b/guix/build/haskell-build-system.scm
index 0e94cf59a5..83c742427a 100644
--- a/guix/build/haskell-build-system.scm
+++ b/guix/build/haskell-build-system.scm
@@ -214,7 +214,10 @@  (define* (register #:key name system inputs outputs #:allow-other-keys)
                (unless dep-conf*-exists?
                  (unless dep-conf-exists?
                    (error (format #f "File ~a does not exist. This usually means the dependency ~a is missing. Was checking conf-file ~a." dep-conf id conf-file)))
-                 (copy-file dep-conf dep-conf*)) ;XXX: maybe symlink instead?
+                 (copy-file dep-conf dep-conf*)
+                 (substitute* dep-conf*
+                   (("(exposed:[ \t]*)True" _ field)
+                    (string-append field "False"))))
                 (loop (vhash-cons id #t seen) next-tail))
              (loop seen tail))))))