;;; Copyright © 2014 John Darrington
;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
;;;
;;; This file is part of GNU Guix.
;;;
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix download)
+ #:use-module (guix git-download)
#:use-module (guix build-system gnu)
#:use-module (guix utils))
(define-public re2
(package
(name "re2")
- (version "2017-06-01")
+ (version "2019-12-01")
+ (home-page "https://github.com/google/re2")
(source (origin
- (method url-fetch)
- (uri
- (string-append
- "https://github.com/google/re2/archive/"
- version ".tar.gz"))
- (file-name (string-append name "-" version ".tar.gz"))
+ (method git-fetch)
+ (uri (git-reference (url home-page) (commit version)))
+ (file-name (git-file-name name version))
(sha256
(base32
- "0bjhmmcx17mc8gfbf3cc4bwjcyf415mas3026v3c35g5fsaxyq5v"))))
+ "0drfhy32a0ndlwc4zi1khx07ifslkrc0w14hj8skqhddkrg55x0l"))))
(build-system gnu-build-system)
(arguments
`(#:modules ((guix build gnu-build-system)
(delete-file (string-append (assoc-ref outputs "out")
"/lib/libre2.a"))
#t)))))
- (home-page "https://github.com/google/re2")
(synopsis "Fast, safe, thread-friendly regular expression engine")
(description "RE2 is a fast, safe, thread-friendly alternative to
backtracking regular expression engines like those used in PCRE, Perl and
"0n36cgqys59r2gmb7jzbqiwsy790v8nbxk82d2n2saz0rp145ild"))))
(build-system gnu-build-system)
(arguments
- `(#:phases (alist-cons-before
- 'check 'install-locales
- (lambda _
- ;; The tests require the availability of the
- ;; 'en_US.ISO-8859-1' locale.
- (setenv "LOCPATH" (getcwd))
- (zero? (system* "localedef" "--no-archive"
- "--prefix" (getcwd) "-i" "en_US"
- "-f" "ISO-8859-1" "./en_US.ISO-8859-1")))
- %standard-phases)))
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-before 'check 'install-locales
+ (lambda _
+ ;; The tests require the availability of the
+ ;; 'en_US.ISO-8859-1' locale.
+ (setenv "LOCPATH" (getcwd))
+ (invoke "localedef" "--no-archive"
+ "--prefix" (getcwd) "-i" "en_US"
+ "-f" "ISO-8859-1" "./en_US.ISO-8859-1"))))))
(synopsis "Approximate regex matching library and agrep utility")
(description "Superset of the POSIX regex API, enabling approximate
matching. Also ships a version of the agrep utility which behaves similar to