From mboxrd@z Thu Jan 1 00:00:00 1970 From: ng0 Subject: [PATCH 58/86] gnu: Add rust-aho-corasick. Date: Tue, 3 Jan 2017 23:36:14 +0000 Message-ID: <20170103233642.3181-59-ng0@libertad.pw> References: <20170103233642.3181-1-ng0@libertad.pw> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54826) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cOYf5-0004Iw-Iv for guix-devel@gnu.org; Tue, 03 Jan 2017 18:38:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cOYf1-00020l-4I for guix-devel@gnu.org; Tue, 03 Jan 2017 18:38:35 -0500 Received: from aibo.runbox.com ([91.220.196.211]:33475) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cOYf0-0001zv-TL for guix-devel@gnu.org; Tue, 03 Jan 2017 18:38:31 -0500 Received: from [10.9.9.211] (helo=mailfront11.runbox.com) by bars.runbox.com with esmtp (Exim 4.71) (envelope-from ) id 1cOYez-0002jV-OX for guix-devel@gnu.org; Wed, 04 Jan 2017 00:38:29 +0100 In-Reply-To: <20170103233642.3181-1-ng0@libertad.pw> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org * gnu/packages/rust.scm (rust-aho-corasick): New variable. --- gnu/packages/rust.scm | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm index f415c91e4..b6946e825 100644 --- a/gnu/packages/rust.scm +++ b/gnu/packages/rust.scm @@ -1594,3 +1594,42 @@ big-endian and little-endian.") "@code{csv} provides CSV parsing with automatic type based decoding and encoding.") (license (list license:unlicense license:expat)))) + +(define-public rust-aho-corasick + (package + (name "rust-aho-corasick") + (version "0.5.3") + (source + (origin + (method url-fetch) + (uri (crate-uri "aho-corasick" version)) + (file-name + (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "0rnvdmlajikq0i4zdy1p3pv699q6apvsxfc7av7byhppllp2r5ya")))) + (build-system cargo-build-system) + (native-inputs + `(("rust-csv" ,rust-csv "src") + ("rust-docopt" ,rust-docopt "src") + ("rust-memmap" ,rust-memmap "src") + ("rust-quickcheck" ,rust-quickcheck "src") + ("rust-rand" ,rust-rand "src") + ("rust-rustc-serialize" ,rust-rustc-serialize "src"))) + (inputs + `(("rust-memchr" ,rust-memchr "src"))) + (home-page "https://github.com/BurntSushi/aho-corasick") + (synopsis "Fast implementation of Aho-Corasick in Rust") + (description + "@code{aho-corasick} provides an implementation of the +Aho-Corasick algorithm. Its intended use case is for fast substring +matching, particularly when matching multiple substrings in a search +text. This is achieved by compiling the substrings into a finite +state machine. + +This implementation provides optimal algorithmic time complexity. +Construction of the finite state machine is O(p) where p is the length +of the substrings concatenated. Matching against search text is +O(n + p + m), where n is the length of the search text and m is the +number of matches.") + (license (list license:unlicense license:expat)))) -- 2.11.0