summary refs log tree commit diff
path: root/gnu/packages/mail.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2020-01-26 23:11:25 +0100
committerLudovic Courtès <ludo@gnu.org>2020-01-26 23:21:38 +0100
commit98dd9ff8006bde715cd25dbd75caceee28b2aa5d (patch)
tree372fd2e096ee9c106c19120c05492b3a75550e28 /gnu/packages/mail.scm
parent3d11114d229035440b49dccd964a2efa7ad5874f (diff)
downloadguix-98dd9ff8006bde715cd25dbd75caceee28b2aa5d.tar.gz
gnu: mailutils: Add "guile3.0-mailutils" variant.
* gnu/packages/mail.scm (mailutils)[arguments]: In #:configure-flags,
replace hard-coded "2.2" with the 'version-major+minor' of the "guile"
input.
(guile3.0-mailutils): New variable.
Diffstat (limited to 'gnu/packages/mail.scm')
-rw-r--r--gnu/packages/mail.scm34
1 files changed, 25 insertions, 9 deletions
diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index 49d04ba7a2..c503b631dc 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2014, 2015, 2017 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2014 Ian Denhardt <ian@zenhack.net>
 ;;; Copyright © 2014 Sou Bunnbu <iyzsong@gmail.com>
@@ -137,7 +137,9 @@
   #:use-module (guix build-system guile)
   #:use-module (guix build-system perl)
   #:use-module (guix build-system python)
-  #:use-module (guix build-system trivial))
+  #:use-module (guix build-system trivial)
+  #:use-module (srfi srfi-1)
+  #:use-module (ice-9 match))
 
 (define-public mailutils
   (package
@@ -152,7 +154,7 @@
                "1wkn9ch664477r4d8jk9153w5msljsbj99907k7zgzpmywbs6ba7"))))
     (build-system gnu-build-system)
     (arguments
-     '(#:phases
+     `(#:phases
        (modify-phases %standard-phases
          (add-before 'check 'prepare-test-suite
            (lambda _
@@ -200,12 +202,18 @@
 
              #t)))
        ;; TODO: Add `--with-sql'.
-       #:configure-flags (list "--sysconfdir=/etc"
-
-                               ;; Add "/2.2" to the installation directory.
-                               (string-append "--with-guile-site-dir="
-                                              (assoc-ref %outputs "out")
-                                              "/share/guile/site/2.2"))
+       #:configure-flags
+       (list "--sysconfdir=/etc"
+
+             ;; Add "/X.Y" to the installation directory.
+             (string-append "--with-guile-site-dir="
+                            (assoc-ref %outputs "out")
+                            "/share/guile/site/"
+                            ,(match (assoc "guile"
+                                           (package-inputs this-package))
+                               (("guile" guile)
+                                (version-major+minor
+                                 (package-version guile))))))
 
        #:parallel-tests? #f))
     (native-inputs
@@ -238,6 +246,14 @@ software.")
      ;; Libraries are under LGPLv3+, and programs under GPLv3+.
      (list gpl3+ lgpl3+))))
 
+(define-public guile3.0-mailutils
+  (package
+    (inherit mailutils)
+    (name "guile3.0-mailutils")
+    (inputs
+     `(("guile" ,guile-3.0)
+       ,@(alist-delete "guile" (package-inputs mailutils))))))
+
 (define-public nullmailer
   (package
     (name "nullmailer")