bison.scm 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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. (define-module (gnu packages bison)
  19. #:use-module (guix licenses)
  20. #:use-module (guix packages)
  21. #:use-module (guix download)
  22. #:use-module (guix build-system gnu)
  23. #:use-module (gnu packages m4)
  24. #:use-module (gnu packages perl)
  25. #:use-module (gnu packages flex)
  26. #:use-module (srfi srfi-1))
  27. (define-public bison
  28. (package
  29. (name "bison")
  30. (version "3.0.4")
  31. (source
  32. (origin
  33. (method url-fetch)
  34. (uri (string-append "mirror://gnu/bison/bison-"
  35. version ".tar.xz"))
  36. (sha256
  37. (base32
  38. "1qbgf6q1n2z17k8g33444m0q68kf3fbiq65q7jlrzpvvj73jh957"))))
  39. (build-system gnu-build-system)
  40. (native-inputs `(("perl" ,perl)
  41. ;; m4 is not present in PATH when cross-building
  42. ("m4" ,m4)))
  43. (inputs `(("flex" ,flex)))
  44. (propagated-inputs `(("m4" ,m4)))
  45. (home-page "https://www.gnu.org/software/bison/")
  46. (synopsis "Parser generator")
  47. (description
  48. "GNU Bison is a general-purpose parser generator. It can build a
  49. deterministic or generalized LR parser from an annotated, context-free
  50. grammar. It is versatile enough to have many applications, from parsers for
  51. simple tools through complex programming languages.")
  52. (license gpl3+)))
  53. (define-public bison-2.7
  54. (package (inherit bison)
  55. (version "2.7")
  56. (source
  57. (origin
  58. (method url-fetch)
  59. (uri (string-append "mirror://gnu/bison/bison-"
  60. version ".tar.xz"))
  61. (sha256
  62. (base32
  63. "1zd77ilmpv5mi3kr55jrj6ncqlcnyhpianhrwzak2q28cv2cbn23"))))))