guix: lint: Make exception for package name starting description.
[jackhill/guix/guix.git] / gnu / packages / flex.scm
CommitLineData
233e7676 1;;; GNU Guix --- Functional package management for GNU
9e771e3b 2;;; Copyright © 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org>
e2b2c466 3;;;
233e7676 4;;; This file is part of GNU Guix.
e2b2c466 5;;;
233e7676 6;;; GNU Guix is free software; you can redistribute it and/or modify it
e2b2c466
LC
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;;;
233e7676 11;;; GNU Guix is distributed in the hope that it will be useful, but
e2b2c466
LC
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
233e7676 17;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
e2b2c466 18
1ffa7090 19(define-module (gnu packages flex)
4a44e743 20 #:use-module (guix licenses)
e2b2c466
LC
21 #:use-module (guix packages)
22 #:use-module (guix download)
23 #:use-module (guix build-system gnu)
59a43334 24 #:use-module (gnu packages)
1ffa7090
LC
25 #:use-module (gnu packages m4)
26 #:use-module (gnu packages bison)
55f03366 27 #:use-module (gnu packages indent)
2aa76ee1 28 #:use-module (srfi srfi-1)
55f03366 29 #:export (flex))
e2b2c466 30
55f03366 31(define flex
e2b2c466
LC
32 (package
33 (name "flex")
34 (version "2.5.37")
35 (source (origin
36 (method url-fetch)
37 (uri (string-append "mirror://sourceforge/flex/flex-"
38 version ".tar.bz2"))
39 (sha256
40 (base32
01eafd38
LC
41 "0ah5mi4j62b85a9rllv1004mzjb5cd0mn4glvz13p88rpx77pahp"))
42 (patches (list (search-patch "flex-bison-tests.patch")))))
e2b2c466 43 (build-system gnu-build-system)
2aa76ee1
LC
44 (inputs
45 (let ((bison-for-tests
46 ;; Work around an incompatibility with Bison 3.0:
47 ;; <http://lists.gnu.org/archive/html/bug-bison/2013-09/msg00014.html>.
48 (package (inherit bison)
49 (version "2.7.1")
50 (source (origin
51 (method url-fetch)
52 (uri (string-append "mirror://gnu/bison/bison-"
53 version ".tar.xz"))
54 (sha256
55 (base32
56 "1yx7isx67sdmyijvihgyra1f59fwdz7sqriginvavfj5yb5ss2dl"))))
57
58 ;; Unlike Bison 3.0, this version did not need Flex for its
59 ;; tests, so it allows us to break the cycle.
60 (inputs (alist-delete "flex" (package-inputs bison))))))
01eafd38 61 `(("bison" ,bison-for-tests)
2aa76ee1 62 ("indent" ,indent))))
e2b2c466
LC
63 (propagated-inputs `(("m4" ,m4)))
64 (home-page "http://flex.sourceforge.net/")
9e771e3b 65 (synopsis "Fast lexical analyser generator")
e2b2c466
LC
66 (description
67 "Flex is a tool for generating scanners. A scanner, sometimes
68called a tokenizer, is a program which recognizes lexical patterns in
69text. The flex program reads user-specified input files, or its standard
70input if no file names are given, for a description of a scanner to
71generate. The description is in the form of pairs of regular expressions
72and C code, called rules. Flex generates a C source file named,
73\"lex.yy.c\", which defines the function yylex(). The file \"lex.yy.c\"
74can be compiled and linked to produce an executable. When the executable
75is run, it analyzes its input for occurrences of text matching the
76regular expressions for each rule. Whenever it finds a match, it
77executes the corresponding C code.")
4a44e743
NK
78 (license (bsd-style "file://COPYING"
79 "See COPYING in the distribution."))))
80