diff options
author | Ludovic Courtès <ludo@gnu.org> | 2015-12-19 23:14:45 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2015-12-19 23:16:18 +0100 |
commit | 604d20a2519431cb2d5bf1e062998b5f6fe794e9 (patch) | |
tree | 4871ebc4f04e9076bd3b7c69d945b26e82a1efb5 /gnu/packages/ntp.scm | |
parent | 04dc6c99922a00cdf3fa34f99a73119d6550ae34 (diff) | |
download | guix-604d20a2519431cb2d5bf1e062998b5f6fe794e9.tar.gz |
gnu: Add tlsdate.
* gnu/packages/ntp.scm (tlsdate): New variable.
Diffstat (limited to 'gnu/packages/ntp.scm')
-rw-r--r-- | gnu/packages/ntp.scm | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/gnu/packages/ntp.scm b/gnu/packages/ntp.scm index 9e6db67e3e..4ed2e3cc11 100644 --- a/gnu/packages/ntp.scm +++ b/gnu/packages/ntp.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2014 John Darrington <jmd@gnu.org> ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org> ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com> +;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -22,6 +23,7 @@ #:use-module (gnu packages) #:use-module (gnu packages base) #:use-module (gnu packages linux) + #:use-module (gnu packages autotools) #:use-module (gnu packages pkg-config) #:use-module (gnu packages tls) #:use-module (gnu packages libevent) @@ -29,6 +31,7 @@ #:use-module (guix packages) #:use-module (guix utils) #:use-module (guix download) + #:use-module (guix git-download) #:use-module (guix build-system gnu) #:use-module (srfi srfi-1)) @@ -108,3 +111,43 @@ secure, easy to configure, and accurate enough for most purposes, so it's more minimalist than ntpd.") ;; A few of the source files are under bsd-3. (license (list l:isc l:bsd-3)))) + +(define-public tlsdate + (package + (name "tlsdate") + (version "0.0.13") + (home-page "https://github.com/ioerror/tlsdate") + (source (origin + (method git-fetch) + (uri (git-reference + (commit (string-append "tlsdate-" version)) + (url home-page))) + (sha256 + (base32 + "0w3v63qmbhpqlxjsvf4k3zp90k6mdzi8cdpgshan9iphy1f44xgl")) + (file-name (string-append name "-" version "-checkout")))) + (build-system gnu-build-system) + (arguments + '(#:phases (modify-phases %standard-phases + (add-after 'unpack 'autogen + (lambda _ + ;; The ancestor of 'SOURCE_DATE_EPOCH'; it contains the + ;; date that is recorded in binaries. It must be a + ;; "recent date" since it is used to detect bogus dates + ;; received from servers. + (setenv "COMPILE_DATE" (number->string 1450563040)) + (zero? (system* "sh" "autogen.sh"))))))) + (inputs `(("openssl" ,openssl) + ("libevent" ,libevent))) + (native-inputs `(("pkg-config" ,pkg-config) + ("autoconf" ,autoconf) + ("automake" ,automake) + ("libtool" ,libtool))) + (synopsis "Extract remote time from TLS handshakes") + (description + "@command{tlsdate} sets the local clock by securely connecting with TLS +to remote servers and extracting the remote time out of the secure handshake. +Unlike ntpdate, @command{tlsdate} uses TCP, for instance connecting to a +remote HTTPS or TLS enabled service, and provides some protection against +adversaries that try to feed you malicious time information.") + (license l:bsd-3))) |