From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55774) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fTdCk-0003HH-4b for guix-patches@gnu.org; Thu, 14 Jun 2018 21:07:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fTdCg-0006rR-T4 for guix-patches@gnu.org; Thu, 14 Jun 2018 21:07:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:40805) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fTdCg-0006qj-Oc for guix-patches@gnu.org; Thu, 14 Jun 2018 21:07:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fTdCg-000597-9l for guix-patches@gnu.org; Thu, 14 Jun 2018 21:07:02 -0400 Subject: [bug#31839] [PATCH] gnu: Add dehydrated. Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54921) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fTdBR-000392-4z for guix-patches@gnu.org; Thu, 14 Jun 2018 21:05:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fTdBN-0004Kn-Ur for guix-patches@gnu.org; Thu, 14 Jun 2018 21:05:45 -0400 Received: from mail.lassieur.org ([83.152.10.219]:39910) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fTdBN-0004E1-IV for guix-patches@gnu.org; Thu, 14 Jun 2018 21:05:41 -0400 Received: from localhost.localdomain (88.191.118.83 [88.191.118.83]) by mail.lassieur.org (OpenSMTPD) with ESMTPSA id 4a5ce25e (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO) for ; Fri, 15 Jun 2018 01:05:39 +0000 (UTC) From: =?UTF-8?Q?Cl=C3=A9ment?= Lassieur Date: Fri, 15 Jun 2018 03:05:37 +0200 Message-Id: <20180615010537.26942-1-clement@lassieur.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 31839@debbugs.gnu.org * gnu/packages/tls.scm (dehydrated): New variable. --- gnu/packages/tls.scm | 71 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm index a934a5087..b54cd1526 100644 --- a/gnu/packages/tls.scm +++ b/gnu/packages/tls.scm @@ -12,6 +12,7 @@ ;;; Copyright © 2017, 2018 Marius Bakke ;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice ;;; Copyright © 2017 Rutger Helling +;;; Copyright © 2018 Clément Lassieur ;;; ;;; This file is part of GNU Guix. ;;; @@ -38,10 +39,14 @@ #:use-module (guix build-system python) #:use-module (guix build-system cmake) #:use-module (guix build-system haskell) + #:use-module (guix build-system trivial) #:use-module (gnu packages compression) #:use-module (gnu packages) + #:use-module (gnu packages bash) #:use-module (gnu packages check) + #:use-module (gnu packages curl) #:use-module (gnu packages dns) + #:use-module (gnu packages gawk) #:use-module (gnu packages guile) #:use-module (gnu packages haskell) #:use-module (gnu packages haskell-check) @@ -873,3 +878,69 @@ implement the SSL3.0, TLS1.0, TLS1.1 and TLS1.2 protocol, and support RSA and Ephemeral (Elliptic curve and regular) Diffie Hellman key exchanges, and many extensions.") (license license:bsd-3))) + +(define-public dehydrated + (package + (name "dehydrated") + (version "0.6.2") + (source (origin + (method url-fetch/tarbomb) + (uri (string-append + "https://github.com/lukas2511/dehydrated/archive/v" + version ".tar.gz")) + (sha256 + (base32 + "03p80yj6bnzjc6dkp5hb9wpplmlrla8n5src71cnzw4rj53q8cqn")) + (file-name (string-append name "-" version ".tar.gz")))) + (build-system trivial-build-system) + (arguments + `(#:modules ((guix build utils)) + #:builder + (begin + (use-modules (guix build utils)) + (let* ((source (assoc-ref %build-inputs "source")) + (out (assoc-ref %outputs "out")) + (bin (string-append out "/bin")) + (bash (in-vicinity (assoc-ref %build-inputs "bash") "bin"))) + (mkdir-p bin) + (with-directory-excursion bin + (copy-file + (in-vicinity source (string-append "/dehydrated-" ,version + "/dehydrated")) + (in-vicinity bin "dehydrated")) + (patch-shebang "dehydrated" (list bash)) + + ;; Do not try to write in the store. + (substitute* "dehydrated" + (("SCRIPTDIR=\"\\$.*\"") "SCRIPTDIR=~/.dehydrated")) + + (setenv "PATH" bash) + (wrap-program "dehydrated" + `("PATH" ":" prefix + ,(map (lambda (dir) + (string-append dir "/bin")) + (map (lambda (input) + (assoc-ref %build-inputs input)) + '("coreutils" + "curl" + "diffutils" + "gawk" + "grep" + "openssl" + "sed")))))) + #t)))) + (inputs + `(("bash" ,bash) + ("coreutils" ,coreutils) + ("curl" ,curl) + ("diffutils" ,diffutils) + ("gawk" ,gawk) + ("grep" ,grep) + ("openssl" ,openssl) + ("sed" ,sed))) + (home-page "https://dehydrated.io/") + (synopsis "Let's Encrypt/ACME client implemented as a shell script") + (description "Dehydrated is a client for signing certificates with an +ACME-server (currently only provided by Let's Encrypt) implemented as a +relatively simple Bash script.") + (license license:expat))) -- 2.17.1