GNU bug report logs - #26007
[PATCH 1/1] gnu: Add le-certs.

Previous Next

Package: guix-patches;

Reported by: Leo Famulari <leo <at> famulari.name>

Date: Tue, 7 Mar 2017 09:29:02 UTC

Severity: normal

Tags: patch

Done: ludo <at> gnu.org (Ludovic Courtès)

Bug is archived. No further changes may be made.

Full log


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

From: Leo Famulari <leo <at> famulari.name>
To: guix-patches <at> gnu.org
Subject: [PATCH 1/1] gnu: Add le-certs.
Date: Tue,  7 Mar 2017 04:28:30 -0500
* 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 <andreas <at> enge.fr>
 ;;; Copyright © 2015 Mark H Weaver <mhw <at> netris.org>
 ;;; Copyright © 2016 Ludovic Courtès <ludo <at> gnu.org>
+;;; Copyright © 2017 Leo Famulari <leo <at> famulari.name>
 ;;;
 ;;; 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





This bug report was last modified 8 years and 164 days ago.

Previous Next


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