GNU bug report logs - #61420
[PATCH 00/31] Haskell upgrade to Stackage 20.5

Previous Next

Package: guix-patches;

Reported by: Lars-Dominik Braun <lars <at> 6xq.net>

Date: Sat, 11 Feb 2023 10:00:02 UTC

Severity: normal

Tags: patch

Done: Lars-Dominik Braun <lars <at> 6xq.net>

Bug is archived. No further changes may be made.

Full log


Message #83 received at 61420 <at> debbugs.gnu.org (full text, mbox):

From: Lars-Dominik Braun <lars <at> 6xq.net>
To: 61420 <at> debbugs.gnu.org
Cc: Lars-Dominik Braun <lars <at> 6xq.net>
Subject: [PATCH 24/31] gnu: hledger: Drop Haskell libraries and documentation.
Date: Sat, 11 Feb 2023 11:08:18 +0100
* gnu/packages/finance.scm (ghc-hledger): New variable.
(hledger): Inherit from ghc-hledger and add 'remove-libraries phase and
disable #:haddock?.
---
 gnu/packages/finance.scm | 48 ++++++++++++++++++++++++++--------------
 1 file changed, 31 insertions(+), 17 deletions(-)

diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm
index d04cf465f4..28f9f67595 100644
--- a/gnu/packages/finance.scm
+++ b/gnu/packages/finance.scm
@@ -212,9 +212,9 @@ (define-public bitcoin-core-23.0
 
 (define-public bitcoin-core bitcoin-core-23.0)
 
-(define-public hledger
+(define-public ghc-hledger
   (package
-    (name "hledger")
+    (name "ghc-hledger")
     (version "1.27.1")
     (source (origin
               (method url-fetch)
@@ -223,14 +223,6 @@ (define-public hledger
                (base32
                 "0qdg87m7ys2ykqqq32p7h7aw827w4f5bcqx4dspxxq6zqlvzddqb"))))
     (build-system haskell-build-system)
-    (arguments
-     (list
-      #:phases
-      #~(modify-phases %standard-phases
-          (add-after 'install 'install-doc
-            (lambda _
-              (install-file "hledger.info" (string-append #$output "/share/info"))
-              (install-file "hledger.1" (string-append #$output "/man/man1")))))))
     (properties '((upstream-name . "hledger")))
     (inputs (list ghc-decimal
                   ghc-diff
@@ -273,6 +265,23 @@ (define-public hledger
 Accounting.")
     (license license:gpl3)))
 
+(define-public hledger
+  (package
+    (inherit ghc-hledger)
+    (name "hledger")
+    (arguments
+     (list
+      #:haddock? #f
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'install 'install-doc
+            (lambda _
+              (install-file "hledger.info" (string-append #$output "/share/info"))
+              (install-file "hledger.1" (string-append #$output "/man/man1"))))
+           (add-after 'register 'remove-libraries
+             (lambda* (#:key outputs #:allow-other-keys)
+               (delete-file-recursively (string-append (assoc-ref outputs "out") "/lib")))))))))
+
 (define-public homebank
   (package
     (name "homebank")
@@ -1988,7 +1997,7 @@ (define-public hledger-web
                   ghc-data-default
                   ghc-extra
                   ghc-hjsmin
-                  hledger
+                  ghc-hledger
                   ghc-hledger-lib
                   ghc-hspec
                   ghc-http-client
@@ -2012,12 +2021,17 @@ (define-public hledger-web
                   ghc-yesod-static
                   ghc-yesod-test))
     (arguments
-     (list #:phases
-           #~(modify-phases %standard-phases
-               ;; Tests write to $HOME.
-               (add-before 'check 'set-home
-                 (lambda _
-                   (setenv "HOME" "/tmp"))))))
+     (list
+      #:haddock? #f
+      #:phases
+      #~(modify-phases %standard-phases
+          ;; Tests write to $HOME.
+          (add-before 'check 'set-home
+            (lambda _
+              (setenv "HOME" "/tmp")))
+           (add-after 'register 'remove-libraries
+             (lambda* (#:key outputs #:allow-other-keys)
+               (delete-file-recursively (string-append (assoc-ref outputs "out") "/lib")))))))
     (home-page "http://hledger.org")
     (synopsis "Web-based user interface for the hledger accounting system")
     (description
-- 
2.38.2





This bug report was last modified 2 years and 171 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.