summaryrefslogtreecommitdiff
path: root/guix/forge/acme.scm
blob: ee715aedf346fb883dfdcac60a4503f04dc02022 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
;;; guix-forge --- Guix software forge meta-service
;;; Copyright © 2023 Arun Isaac <arunisaac@systemreboot.net>
;;;
;;; This file is part of guix-forge.
;;;
;;; guix-forge is free software: you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published
;;; by the Free Software Foundation, either version 3 of the License,
;;; or (at your option) any later version.
;;;
;;; guix-forge is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
;;; General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with guix-forge.  If not, see
;;; <https://www.gnu.org/licenses/>.

(define-module (forge acme)
  #:use-module ((gnu packages autotools) #:select (autoconf automake))
  #:use-module ((gnu packages curl) #:select (curl))
  #:use-module ((gnu packages documentation) #:select (asciidoc))
  #:use-module ((gnu packages pkg-config) #:select (pkg-config))
  #:use-module ((gnu packages tls) #:select (gnutls))
  #:use-module (guix build-system gnu)
  #:use-module (guix gexp)
  #:use-module (guix git-download)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix packages))

(define-public uacme
  (package
    (name "uacme")
    (version "1.7.4")
    (source (origin
              ;; TODO: Unbundle libev.
              (method git-fetch)
              (uri (git-reference
                    (url "https://github.com/ndilieto/uacme/")
                    (commit (string-append "v" version))))
              (file-name (git-file-name name version))
              (sha256
               (base32
                "1jhjyjnrfq07qgslmz1qpka1ahnmpya2garbxldkh2fr0bmsn26b"))))
    (build-system gnu-build-system)
    (arguments
     (list #:phases
           #~(modify-phases %standard-phases
               (add-after 'unpack 'set-version
                 (lambda _
                   (substitute* "configure.ac"
                     (("m4_esyscmd\\(\\[build-aux/git-version-gen \\.tarball-version\\]\\)")
                      #$version)))))))
    (inputs
     (list curl gnutls))
    (native-inputs
     (list asciidoc autoconf automake pkg-config))
    (home-page "https://github.com/ndilieto/uacme")
    (synopsis "Minimal ACMEv2 client written in C")
    (description "uacme is a lightweight client for the RFC8555 ACMEv2
protocol, written in plain C with minimal dependencies.  The ACMEv2
protocol allows a Certificate Authority such as Let's Encrypt and an
applicant to automate the process of verification and certificate
issuance.

uacme calls an external hook program with the tokens required for
domain authorization.  The hook program can be an executable, shell
script, perl script, python script, or any file that the operating
system can execute.

uacme is ACME challenge agnostic.  It provides the user or hook
program with all tokens and information required to complete any
challenge type but leaves the task of setting up and cleaning up the
challenge environment to the user or hook.

uacme also includes ualpn, a lightweight proxying tls-alpn-01
challenge responder compliant with RFC8737 and RFC8738.")
    (license license:gpl3+)))