Commit | Line | Data |
---|---|---|
e2b2c466 LC |
1 | ;;; Guix --- Nix package management from Guile. -*- coding: utf-8 -*- |
2 | ;;; Copyright (C) 2012 Ludovic Courtès <ludo@gnu.org> | |
3 | ;;; | |
4 | ;;; This file is part of Guix. | |
5 | ;;; | |
6 | ;;; 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 | ;;; 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 Guix. If not, see <http://www.gnu.org/licenses/>. | |
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) | |
26 | #:use-module (distro packages bison)) | |
27 | ||
28 | (define-public flex | |
29 | (package | |
30 | (name "flex") | |
31 | (version "2.5.37") | |
32 | (source (origin | |
33 | (method url-fetch) | |
34 | (uri (string-append "mirror://sourceforge/flex/flex-" | |
35 | version ".tar.bz2")) | |
36 | (sha256 | |
37 | (base32 | |
38 | "0ah5mi4j62b85a9rllv1004mzjb5cd0mn4glvz13p88rpx77pahp")))) | |
39 | (build-system gnu-build-system) | |
40 | (arguments | |
41 | '(#:patches (list (assoc-ref %build-inputs "patch/bison-tests")))) | |
42 | (inputs `(("patch/bison-tests" ,(search-patch "flex-bison-tests.patch")) | |
43 | ("bison" ,bison))) | |
44 | (propagated-inputs `(("m4" ,m4))) | |
45 | (home-page "http://flex.sourceforge.net/") | |
46 | (synopsis "A fast lexical analyser generator") | |
47 | (description | |
48 | "Flex is a tool for generating scanners. A scanner, sometimes | |
49 | called a tokenizer, is a program which recognizes lexical patterns in | |
50 | text. The flex program reads user-specified input files, or its standard | |
51 | input if no file names are given, for a description of a scanner to | |
52 | generate. The description is in the form of pairs of regular expressions | |
53 | and C code, called rules. Flex generates a C source file named, | |
54 | \"lex.yy.c\", which defines the function yylex(). The file \"lex.yy.c\" | |
55 | can be compiled and linked to produce an executable. When the executable | |
56 | is run, it analyzes its input for occurrences of text matching the | |
57 | regular expressions for each rule. Whenever it finds a match, it | |
58 | executes the corresponding C code.") | |
4a44e743 NK |
59 | (license (bsd-style "file://COPYING" |
60 | "See COPYING in the distribution.")))) | |
61 |