gnu: pari-gp: Update to 2.5.4.
[jackhill/guix/guix.git] / gnu / packages / flex.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012 Ludovic Courtès <ludo@gnu.org>
3 ;;;
4 ;;; This file is part of GNU Guix.
5 ;;;
6 ;;; GNU Guix is free software; you can redistribute it and/or modify it
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 ;;;
11 ;;; GNU Guix is distributed in the hope that it will be useful, but
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
17 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
18
19 (define-module (gnu packages flex)
20 #:use-module (guix licenses)
21 #:use-module (guix packages)
22 #:use-module (guix download)
23 #:use-module (guix build-system gnu)
24 #:use-module (gnu packages)
25 #:use-module (gnu packages m4)
26 #:use-module (gnu packages bison)
27 #:use-module (gnu packages indent))
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"))
44 ("bison" ,bison)
45 ("indent" ,indent)))
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
51 called a tokenizer, is a program which recognizes lexical patterns in
52 text. The flex program reads user-specified input files, or its standard
53 input if no file names are given, for a description of a scanner to
54 generate. The description is in the form of pairs of regular expressions
55 and 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\"
57 can be compiled and linked to produce an executable. When the executable
58 is run, it analyzes its input for occurrences of text matching the
59 regular expressions for each rule. Whenever it finds a match, it
60 executes the corresponding C code.")
61 (license (bsd-style "file://COPYING"
62 "See COPYING in the distribution."))))
63