* [bug#38593] Remove invalid library directories from some haskell packages
@ 2019-12-13 14:38 John Soo
2019-12-18 12:41 ` [bug#38593] [PATCH] " John Soo
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: John Soo @ 2019-12-13 14:38 UTC (permalink / raw)
To: 38593
[-- Attachment #1.1: Type: text/plain, Size: 286 bytes --]
Hi all,
When compiling with ghc, I have been getting the message that the following
packages have invalid package databases. These patches remove the library
from the output, keeping the executables.
There may be other packages with this problem but I have not done an audit.
- John
[-- Attachment #1.2: Type: text/html, Size: 421 bytes --]
[-- Attachment #2: 0001-gnu-ghc-hpack-Remove-invalid-lib-directory.patch --]
[-- Type: text/x-patch, Size: 1168 bytes --]
From f7bca9fca0b01b1c770d388fea80cbcee042b14a Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Sun, 17 Nov 2019 01:15:16 -0800
Subject: [PATCH 1/3] gnu: ghc-hpack: Remove invalid lib directory.
* gnu/packages/haskell-xyz.scm (ghc-hpack): Remove invalid library directory
from output.
---
gnu/packages/haskell-xyz.scm | 7 +++++++
1 file changed, 7 insertions(+)
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")))))))
(home-page "https://github.com/sol/hpack")
(synopsis "Tools for an alternative Haskell package format")
(description
--
2.24.0
[-- Attachment #3: 0003-gnu-hoogle-Remove-invalid-library.patch --]
[-- Type: text/x-patch, Size: 1176 bytes --]
From eb18a37d60039c5f67f7cb923c88433159a8387c Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Sun, 17 Nov 2019 08:25:53 -0800
Subject: [PATCH 3/3] gnu: hoogle: Remove invalid library.
* gnu/packages/haskell-apps.scm (hoogle): Remove invalid library from output.
---
gnu/packages/haskell-apps.scm | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/gnu/packages/haskell-apps.scm b/gnu/packages/haskell-apps.scm
index 5a16b1bb91..1e79294737 100644
--- a/gnu/packages/haskell-apps.scm
+++ b/gnu/packages/haskell-apps.scm
@@ -500,6 +500,13 @@ unwanted suggestions, and to add your own custom suggestions.")
("ghc-warp" ,ghc-warp)
("ghc-warp-tls" ,ghc-warp-tls)
("ghc-zlib" ,ghc-zlib)))
+ (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")))))))
(home-page "https://hoogle.haskell.org/")
(synopsis "Haskell API Search")
(description "Hoogle is a Haskell API search engine, which allows
--
2.24.0
[-- Attachment #4: 0002-gnu-hlint-Remove-invalid-lib-directory.patch --]
[-- Type: text/x-patch, Size: 1215 bytes --]
From c634931be8790342a0eaeec2bbef6f058c86448e Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Sun, 17 Nov 2019 01:19:20 -0800
Subject: [PATCH 2/3] gnu: hlint: Remove invalid lib directory.
* gnu/packages/haskell-apps.scm (hlint): Remove invalid library from output.
---
gnu/packages/haskell-apps.scm | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/gnu/packages/haskell-apps.scm b/gnu/packages/haskell-apps.scm
index d5c31cbb0b..5a16b1bb91 100644
--- a/gnu/packages/haskell-apps.scm
+++ b/gnu/packages/haskell-apps.scm
@@ -441,6 +441,13 @@ used to keep a folder in sync between computers.")
("ghc-aeson" ,ghc-aeson)
("ghc-lib-parser" ,ghc-lib-parser)
("hscolour" ,hscolour)))
+ (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")))))))
(home-page "http://community.haskell.org/~ndm/hlint/")
(synopsis "Suggest improvements for Haskell source code")
(description "HLint reads Haskell programs and suggests changes that
--
2.24.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [bug#38593] [PATCH] Remove invalid library directories from some haskell packages
2019-12-13 14:38 [bug#38593] Remove invalid library directories from some haskell packages John Soo
@ 2019-12-18 12:41 ` John Soo
2019-12-19 22:30 ` [bug#38593] " Ludovic Courtès
2021-01-01 18:30 ` bug#38593: Have not experienced this problem in a long time John Soo
2 siblings, 0 replies; 6+ messages in thread
From: John Soo @ 2019-12-18 12:41 UTC (permalink / raw)
To: 38593
[-- Attachment #1: Type: text/plain, Size: 56 bytes --]
I forgot to mention there are patches attached to this.
[-- Attachment #2: Type: text/html, Size: 81 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* [bug#38593] Remove invalid library directories from some haskell packages
2019-12-13 14:38 [bug#38593] Remove invalid library directories from some haskell packages John Soo
2019-12-18 12:41 ` [bug#38593] [PATCH] " John Soo
@ 2019-12-19 22:30 ` Ludovic Courtès
2019-12-20 21:28 ` John Soo
2021-01-01 18:30 ` bug#38593: Have not experienced this problem in a long time John Soo
2 siblings, 1 reply; 6+ messages in thread
From: Ludovic Courtès @ 2019-12-19 22:30 UTC (permalink / raw)
To: John Soo; +Cc: 38593
Hi,
John Soo <jsoo1@asu.edu> 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’.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [bug#38593] Remove invalid library directories from some haskell packages
2019-12-19 22:30 ` [bug#38593] " Ludovic Courtès
@ 2019-12-20 21:28 ` John Soo
0 siblings, 0 replies; 6+ messages in thread
From: John Soo @ 2019-12-20 21:28 UTC (permalink / raw)
To: Ludovic Courtès, help-guix; +Cc: 38593
Hi Ludo and guix,
Let me explain my problem. Maybe there is some other explanation here and these patches aren’t necessary.
When I have stylish-haskell installed I have troubles compiling anything using plain ghc. I want to use the ghc packages in the profile but for some reason ghc reports the database is invalid because of at least stylish-haskell and I think I’ve seen hoogle as well.
> Does it hurt in practice, or are these invalid databases shadowed by the
> one created in the profile?
I’m not sure what you mean here. I think I dod not explained my problem well enough. Does the explanation above make sense?
Another possibility is the duplication of path variables in tmux where I usually operate.
Thinking now, maybe another explanation is because stylish-haskell and ghc-stylish-haskell are fighting each other? They are duplicate packages and maybe if one is removed it will be ok?
> Should we add a phase in ‘haskell-build-system’ that systematically
> removes package databases?
I don’t think so. I like having the profile packages. A lot of times I prefer to use plain ghc with the profile packages over cabal or another tool so I’m happy to have the packages in the database.
The ones I was considering removing were ones that primarily provide a binary to use - hoogle and stylish-haskell are primarily used as binaries. However on second thought if I wanted to use them as libraries I think I would be confused as to why I could not.
Overall I am leaning towards finding some other solution.
Thanks everyone!
John
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [bug#38593] Remove invalid library directories from some haskell packages
@ 2019-12-20 21:28 ` John Soo
0 siblings, 0 replies; 6+ messages in thread
From: John Soo @ 2019-12-20 21:28 UTC (permalink / raw)
To: Ludovic Courtès, help-guix; +Cc: 38593
Hi Ludo and guix,
Let me explain my problem. Maybe there is some other explanation here and these patches aren’t necessary.
When I have stylish-haskell installed I have troubles compiling anything using plain ghc. I want to use the ghc packages in the profile but for some reason ghc reports the database is invalid because of at least stylish-haskell and I think I’ve seen hoogle as well.
> Does it hurt in practice, or are these invalid databases shadowed by the
> one created in the profile?
I’m not sure what you mean here. I think I dod not explained my problem well enough. Does the explanation above make sense?
Another possibility is the duplication of path variables in tmux where I usually operate.
Thinking now, maybe another explanation is because stylish-haskell and ghc-stylish-haskell are fighting each other? They are duplicate packages and maybe if one is removed it will be ok?
> Should we add a phase in ‘haskell-build-system’ that systematically
> removes package databases?
I don’t think so. I like having the profile packages. A lot of times I prefer to use plain ghc with the profile packages over cabal or another tool so I’m happy to have the packages in the database.
The ones I was considering removing were ones that primarily provide a binary to use - hoogle and stylish-haskell are primarily used as binaries. However on second thought if I wanted to use them as libraries I think I would be confused as to why I could not.
Overall I am leaning towards finding some other solution.
Thanks everyone!
John
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#38593: Have not experienced this problem in a long time
2019-12-13 14:38 [bug#38593] Remove invalid library directories from some haskell packages John Soo
2019-12-18 12:41 ` [bug#38593] [PATCH] " John Soo
2019-12-19 22:30 ` [bug#38593] " Ludovic Courtès
@ 2021-01-01 18:30 ` John Soo
2 siblings, 0 replies; 6+ messages in thread
From: John Soo @ 2021-01-01 18:30 UTC (permalink / raw)
To: 38593-done
I have not experienced this issue in a long time. I may come back to it
if it ever happens again.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-01-01 18:31 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-13 14:38 [bug#38593] Remove invalid library directories from some haskell packages John Soo
2019-12-18 12:41 ` [bug#38593] [PATCH] " John Soo
2019-12-19 22:30 ` [bug#38593] " Ludovic Courtès
2019-12-20 21:28 ` John Soo
2019-12-20 21:28 ` John Soo
2021-01-01 18:30 ` bug#38593: Have not experienced this problem in a long time John Soo
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.