doc: Update htmlxref.cnf.
[guix.git] / gnu / packages / authentication.scm
blob68a64598280cc12147c02ca4ff799eb2ab06e442
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
3 ;;;
4 ;;; This file is part of GNU Guix.
5 ;;;
6 ;;; GNU Guix is free software; you can redistribute it and/or modify it
7 ;;; under the terms of the GNU General Public License as published by
8 ;;; the Free Software Foundation; either version 3 of the License, or (at
9 ;;; your option) any later version.
10 ;;;
11 ;;; GNU Guix is distributed in the hope that it will be useful, but
12 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 ;;; GNU General Public License for more details.
15 ;;;
16 ;;; You should have received a copy of the GNU General Public License
17 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
19 (define-module (gnu packages authentication)
20   #:use-module (gnu packages)
21   #:use-module (gnu packages linux)
22   #:use-module (gnu packages pkg-config)
23   #:use-module (guix build-system gnu)
24   #:use-module (guix download)
25   #:use-module ((guix licenses) #:prefix license:)
26   #:use-module (guix packages))
28 (define-public oath-toolkit
29   ;; If gcc@7 breaks this package before its next release, try patching it:
30   ;; <https://gitlab.com/oath-toolkit/oath-toolkit/issues/2#note_52958748>.
31   (package
32     (name "oath-toolkit")
33     (version "2.6.2")
34     (source
35      (origin
36        (method url-fetch)
37        (uri (string-append "https://download.savannah.nongnu.org/releases/"
38                            name "/" name "-" version ".tar.gz"))
39        (patches (search-patches "oath-toolkit-glibc-compat.patch"))
40        (sha256
41         (base32 "182ah8vfbg0yhv6mh1b6ap944d0na6x7lpfkwkmzb6jl9gx4cd5h"))))
42     (build-system gnu-build-system)
43     (arguments
44      ;; TODO ‘--enable-pskc’ causes xmlsec-related test suite failures.
45      `(#:configure-flags
46        (list "--enable-pam")
47        #:phases
48        (modify-phases %standard-phases
49          (add-after 'install 'delete-static-libraries
50            (lambda* (#:key outputs #:allow-other-keys)
51              (let* ((out (assoc-ref outputs "out"))
52                     (lib (string-append out "/lib")))
53                (for-each delete-file (find-files lib "\\.a$"))
54                #t))))))
55     (native-inputs
56      `(("pkg-config" ,pkg-config)))
57     (inputs
58      `(("linux-pam" ,linux-pam)))       ; for --enable-pam
59     (home-page "https://www.nongnu.org/oath-toolkit/")
60     (synopsis "One-time password (OTP) components")
61     ;; TODO Add the following items after they've been enabled.
62     ;; @item @command{pskctool}, a command-line tool for manipulating secret key
63     ;; files in the Portable Symmetric Key Container (@dfn{PSKC}) format
64     ;; described in RFC6030.
65     ;; @item @code{libpskc}, a shared and static C library for PSKC handling.
66     (description
67      "The @dfn{OATH} (Open AuTHentication) Toolkit provides various components
68 for building one-time password (@dfn{OTP}) authentication systems:
70 @itemize
71 @item @command{oathtool}, a command-line tool for generating & validating OTPs.
72 @item @code{liboath}, a C library for OATH handling.
73 @item @code{pam_oath}, a PAM module for pluggable login authentication.
74 @end itemize
76 Supported technologies include the event-based @dfn{HOTP} algorithm (RFC4226)
77 and the time-based @dfn{TOTP} algorithm (RFC6238).")
78     (license (list license:lgpl2.1+     ; the libraries (liboath/ & libpskc/)
79                    license:gpl3+))))    ; the tools (everything else)