Merge branch 'master' into core-updates
[jackhill/guix/guix.git] / gnu / packages / bison.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013, 2015 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 bison)
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 m4)
25 #:use-module (gnu packages perl)
26 #:use-module (gnu packages flex)
27 #:use-module (srfi srfi-1)
28 #:export (bison))
29
30 (define bison
31 (package
32 (name "bison")
33 (version "3.0.4")
34 (source
35 (origin
36 (method url-fetch)
37 (uri (string-append "mirror://gnu/bison/bison-"
38 version ".tar.xz"))
39 (sha256
40 (base32
41 "1qbgf6q1n2z17k8g33444m0q68kf3fbiq65q7jlrzpvvj73jh957"))))
42 (build-system gnu-build-system)
43 (native-inputs `(("perl" ,perl)
44 ;; m4 is not present in PATH when cross-building
45 ("m4" ,m4)))
46 (inputs `(("flex" ,flex)))
47 (propagated-inputs `(("m4" ,m4)))
48 (home-page "http://www.gnu.org/software/bison/")
49 (synopsis "Parser generator")
50 (description
51 "GNU Bison is a general-purpose parser generator. It can build a
52 deterministic or generalized LR parser from an annotated, context-free
53 grammar. It is versatile enough to have many applications, from parsers for
54 simple tools through complex programming languages.")
55 (license gpl3+)))
56
57 (define-public bison-2.7
58 (package (inherit bison)
59 (version "2.7")
60 (source
61 (origin
62 (method url-fetch)
63 (uri (string-append "mirror://gnu/bison/bison-"
64 version ".tar.xz"))
65 (sha256
66 (base32
67 "1zd77ilmpv5mi3kr55jrj6ncqlcnyhpianhrwzak2q28cv2cbn23"))))))
68