guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Leo Famulari
Subject: bug#26007: [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 <address@hidden>
 ;;; Copyright © 2015 Mark H Weaver <address@hidden>
 ;;; Copyright © 2016 Ludovic Courtès <address@hidden>
+;;; Copyright © 2017 Leo Famulari <address@hidden>
 ;;;
 ;;; 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






reply via email to

[Prev in Thread] Current Thread [Next in Thread]