Update `HACKING'.
[jackhill/guix/guix.git] / distro / packages / flex.scm
CommitLineData
233e7676
LC
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2012 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
5321f74f 19(define-module (distro 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)
24 #:use-module (distro)
25 #:use-module (distro packages m4)
dd9e87e1
AE
26 #:use-module (distro packages bison)
27 #:use-module (distro packages indent))
e2b2c466
LC
28
29(define-public flex
30 (package
31 (name "flex")
32 (version "2.5.37")
33 (source (origin
34 (method url-fetch)
35 (uri (string-append "mirror://sourceforge/flex/flex-"
36 version ".tar.bz2"))
37 (sha256
38 (base32
39 "0ah5mi4j62b85a9rllv1004mzjb5cd0mn4glvz13p88rpx77pahp"))))
40 (build-system gnu-build-system)
41 (arguments
42 '(#:patches (list (assoc-ref %build-inputs "patch/bison-tests"))))
43 (inputs `(("patch/bison-tests" ,(search-patch "flex-bison-tests.patch"))
dd9e87e1
AE
44 ("bison" ,bison)
45 ("indent" ,indent)))
e2b2c466
LC
46 (propagated-inputs `(("m4" ,m4)))
47 (home-page "http://flex.sourceforge.net/")
48 (synopsis "A fast lexical analyser generator")
49 (description
50 "Flex is a tool for generating scanners. A scanner, sometimes
51called a tokenizer, is a program which recognizes lexical patterns in
52text. The flex program reads user-specified input files, or its standard
53input if no file names are given, for a description of a scanner to
54generate. The description is in the form of pairs of regular expressions
55and C code, called rules. Flex generates a C source file named,
56\"lex.yy.c\", which defines the function yylex(). The file \"lex.yy.c\"
57can be compiled and linked to produce an executable. When the executable
58is run, it analyzes its input for occurrences of text matching the
59regular expressions for each rule. Whenever it finds a match, it
60executes the corresponding C code.")
4a44e743
NK
61 (license (bsd-style "file://COPYING"
62 "See COPYING in the distribution."))))
63