diff mbox series

[bug#44423,1/3] gnu: Add mailcap.

Message ID 20201103191918.7944-1-brown121407@posteo.ro
State Accepted
Headers show
Series Update gmnisrv. | expand

Checks

Context Check Description
cbaines/submitting builds success
cbaines/issue success View issue
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job

Commit Message

Alexandru-Sergiu Marton Nov. 3, 2020, 7:19 p.m. UTC
* gnu/packages/mail.scm (mailcap): New variable.
---
 gnu/packages/mail.scm | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

Comments

Christopher Baines Nov. 14, 2020, 11:42 a.m. UTC | #1
Alexandru-Sergiu Marton <brown121407@posteo.ro> writes:

> * gnu/packages/mail.scm (mailcap): New variable.
> ---
>  gnu/packages/mail.scm | 37 +++++++++++++++++++++++++++++++++++++
>  1 file changed, 37 insertions(+)
>
> diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
> index 44a156fd99..2f4173dc92 100644
> --- a/gnu/packages/mail.scm
> +++ b/gnu/packages/mail.scm
> @@ -747,6 +747,43 @@ MIME-encoded email package.")
>        (home-page "https://github.com/inflex/ripMIME")
>        (license license:bsd-3))))
>  
> +(define-public mailcap
> +  (let* ((version "2.1.49")
> +         (tag ;; mailcap tags their releases like this: rMajor-minor-patch
> +          (string-append "r" (string-join (string-split version #\.) "-"))))
> +    (package
> +      (name "mailcap")
> +      (version version)
> +      (source
> +       (origin
> +         (method git-fetch)
> +         (uri (git-reference
> +               (url "https://pagure.io/mailcap.git")
> +               (commit tag)))
> +         (file-name (git-file-name name version))
> +         (sha256
> +          (base32
> +           "0ck1fw6gqn51phcfakhfpfq1yziv3gnmgjvswzhj9x0p162n6alj"))))
> +      (build-system gnu-build-system)
> +      (arguments
> +       '(#:phases
> +         (modify-phases %standard-phases
> +           (delete 'configure)
> +           (add-before 'install 'set-dest-dir
> +             (lambda* (#:key outputs #:allow-other-keys)
> +               (let ((out (assoc-ref outputs "out")))
> +                 (setenv "DESTDIR" out)
> +                 (substitute* "Makefile"
> +                   (("/usr") "")) ;; This allows the man page to install.
> +                 #t))))))
> +      (native-inputs `(("python" ,python-3.8))) ;; for tests
> +      (synopsis "MIME type associations for file types")
> +      (description "This package provides MIME type associations for file
> +types.")
> +      (home-page "https://pagure.io/mailcap")
> +      (license (list license:expat              ;; mailcap.5
> +                     license:public-domain))))) ;; mailcap and mime.types

This looks fine to me, although looking again at the description now,
it's a bit lacking in context.

I tweaked the indentation in places, and switched the end of line
comments to just use a single ;

> +
>  (define-public bogofilter
>    (package
>      (name "bogofilter")
diff mbox series

Patch

diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index 44a156fd99..2f4173dc92 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -747,6 +747,43 @@  MIME-encoded email package.")
       (home-page "https://github.com/inflex/ripMIME")
       (license license:bsd-3))))
 
+(define-public mailcap
+  (let* ((version "2.1.49")
+         (tag ;; mailcap tags their releases like this: rMajor-minor-patch
+          (string-append "r" (string-join (string-split version #\.) "-"))))
+    (package
+      (name "mailcap")
+      (version version)
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://pagure.io/mailcap.git")
+               (commit tag)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32
+           "0ck1fw6gqn51phcfakhfpfq1yziv3gnmgjvswzhj9x0p162n6alj"))))
+      (build-system gnu-build-system)
+      (arguments
+       '(#:phases
+         (modify-phases %standard-phases
+           (delete 'configure)
+           (add-before 'install 'set-dest-dir
+             (lambda* (#:key outputs #:allow-other-keys)
+               (let ((out (assoc-ref outputs "out")))
+                 (setenv "DESTDIR" out)
+                 (substitute* "Makefile"
+                   (("/usr") "")) ;; This allows the man page to install.
+                 #t))))))
+      (native-inputs `(("python" ,python-3.8))) ;; for tests
+      (synopsis "MIME type associations for file types")
+      (description "This package provides MIME type associations for file
+types.")
+      (home-page "https://pagure.io/mailcap")
+      (license (list license:expat              ;; mailcap.5
+                     license:public-domain))))) ;; mailcap and mime.types
+
 (define-public bogofilter
   (package
     (name "bogofilter")