Subject: [bug#38593] Remove invalid library directories from some haskell packages

From: Ludovic Courtès <[email-masked]>
Date: Thu, 19 Dec 2019 23:30:20 +0100

Hi,

John Soo <[email-masked]> skribis:

> When compiling with ghc, I have been getting the message that the following
> packages have invalid package databases.

Does it hurt in practice, or are these invalid databases shadowed by the
one created in the profile?

> diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm
> index fb6833207d..1d78eb7894 100644
> --- a/gnu/packages/haskell-xyz.scm
> +++ b/gnu/packages/haskell-xyz.scm
> @@ -5500,6 +5500,13 @@ representations of current time.")
>         ("ghc-quickcheck" ,ghc-quickcheck)
>         ("ghc-temporary" ,ghc-temporary)
>         ("hspec-discover" ,hspec-discover)))
> +    (arguments
> +     `(#:phases
> +       (modify-phases %standard-phases
> +         (add-after 'install 'remove-lib
> +           (lambda* (#:key outputs #:allow-other-keys)
> +             (delete-file-recursively
> +              (string-append (assoc-ref outputs "out") "/lib")))))))

Should we add a phase in ‘haskell-build-system’ that systematically
removes package databases?

Thanks,
Ludo’.