Subject: bug#26007: closed (Re: bug#26007: [PATCH 1/1] gnu: Add le-certs.)

From: [email-masked] (GNU bug Tracking System)
Date: Mon, 13 Mar 2017 13:09:03 +0000

Your bug report

#26007: [PATCH 1/1] gnu: Add le-certs.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
26007: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=26007
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#26007: [PATCH 1/1] gnu: Add le-certs.
From: [email-masked] (Ludovic Courtès)
To: [email-masked]
Date: Mon, 13 Mar 2017 14:08:40 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Leo Famulari <[email-masked]> skribis:

> * gnu/packages/certs.scm (le-certs): New variable.

Commit 0a6bd107e506b535a79ff4f3bd214953d592f7e6 closes this.

Ludo'.

Subject: [PATCH 1/1] gnu: Add le-certs.
From: Leo Famulari <[email-masked]>
To: [email-masked]
Date: Tue, 7 Mar 2017 04:28:30 -0500
List-Id: <debbugs-submit.debbugs.gnu.org>

* gnu/packages/certs.scm (le-certs): New variable.
---
 gnu/packages/certs.scm | 46 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)

diff --git a/gnu/packages/certs.scm b/gnu/packages/certs.scm
index b27577bbe..b0d7f656c 100644
--- a/gnu/packages/certs.scm
+++ b/gnu/packages/certs.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2015 Andreas Enge <[email-masked]>
 ;;; Copyright © 2015 Mark H Weaver <[email-masked]>
 ;;; Copyright © 2016 Ludovic Courtès <[email-masked]>
+;;; Copyright © 2017 Leo Famulari <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -25,6 +26,8 @@
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system trivial)
   #:use-module (gnu packages)
+  #:use-module (gnu packages base)
+  #:use-module (gnu packages compression)
   #:use-module (gnu packages python)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages tls))
@@ -139,3 +142,46 @@
 taken from the NSS package and thus ultimately from the Mozilla project.")
     (home-page "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS")
     (license license:mpl2.0)))
+
+(define-public le-certs
+  (package
+    (name "le-certs")
+    (version "0")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append "https://github.com/lfam/le-certs/releases/download"
+                            "/v" version "/le-certs-" version ".tar.gz"))
+        (sha256
+         (base32
+          "1whqhny18xwxklv62f3ih79j1mhidrapgm43makaq65p23lhck57"))))
+    (build-system trivial-build-system)
+    (arguments
+     `(#:modules ((guix build utils))
+       #:builder (begin
+                   (use-modules (guix build utils))
+                   (let* ((tar (string-append (assoc-ref %build-inputs
+                                                         "tar")
+                                              "/bin/tar"))
+                          (PATH (string-append (assoc-ref %build-inputs
+                                                          "gzip")
+                                               "/bin"))
+                          (out (assoc-ref %outputs "out"))
+                          (cert-dir (string-append out "/etc/ssl/certs"))
+                          (source (assoc-ref %build-inputs "source")))
+                     (setenv "PATH" PATH)
+                     (system* tar "xvf" source)
+                     (mkdir-p out)
+                     (chdir (string-append "le-certs-" ,version))
+                     (for-each (lambda (file)
+                                 (install-file file cert-dir))
+                               (find-files "."))))))
+    (native-inputs `(("source" ,source)
+                     ("tar" ,tar)
+                     ("gzip" ,gzip)))
+    (home-page "https://github.com/lfam/le-certs")
+    (synopsis "Let's Encrypt root and intermediate certificates")
+    (description "This package provides a certificate store containing only the
+Let's Encrypt root and intermediate certificates.  It is intended to be used
+within Guix.")
+    (license license:public-domain))) ; TODO, what license?
-- 
2.12.0