bison.scm 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2012, 2013, 2015, 2019 Ludovic Courtès <ludo@gnu.org>
  3. ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
  4. ;;; Copyright © 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
  5. ;;; Copyright © 2020 B. Wilson <elaexuotee@wilsonb.com>
  6. ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
  7. ;;;
  8. ;;; This file is part of GNU Guix.
  9. ;;;
  10. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  11. ;;; under the terms of the GNU General Public License as published by
  12. ;;; the Free Software Foundation; either version 3 of the License, or (at
  13. ;;; your option) any later version.
  14. ;;;
  15. ;;; GNU Guix is distributed in the hope that it will be useful, but
  16. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  17. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. ;;; GNU General Public License for more details.
  19. ;;;
  20. ;;; You should have received a copy of the GNU General Public License
  21. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  22. (define-module (gnu packages bison)
  23. #:use-module (guix licenses)
  24. #:use-module (guix packages)
  25. #:use-module (guix download)
  26. #:use-module (guix build-system gnu)
  27. #:use-module (gnu packages m4)
  28. #:use-module (gnu packages perl)
  29. #:use-module (gnu packages flex)
  30. #:use-module (srfi srfi-1))
  31. (define-public bison
  32. (package
  33. (name "bison")
  34. (version "3.7.6")
  35. (source
  36. (origin
  37. (method url-fetch)
  38. (uri (string-append "mirror://gnu/bison/bison-"
  39. version ".tar.xz"))
  40. (sha256
  41. (base32
  42. "1kzkxrd3z4262k2sbxmyh9k5g5r2lakw0gv44l2hb4i1wbhqrmk7"))))
  43. (build-system gnu-build-system)
  44. (arguments
  45. '(;; Building in parallel on many-core systems may cause an error such as
  46. ;; "mv: cannot stat 'examples/c/reccalc/scan.stamp.tmp': No such file or
  47. ;; directory". See <https://bugs.gnu.org/36238>.
  48. #:parallel-build? #f
  49. ;; Similarly, when building tests in parallel, Make may produce this error:
  50. ;; "./examples/c/reccalc/scan.l:13:10: fatal error: parse.h: No such file
  51. ;; or directory". Full log in <https://bugs.gnu.org/36238>.
  52. #:parallel-tests? #f))
  53. (native-inputs `(("perl" ,perl)
  54. ;; m4 is not present in PATH when cross-building.
  55. ("m4" ,m4)))
  56. (inputs `(("flex" ,flex)))
  57. (propagated-inputs `(("m4" ,m4)))
  58. (home-page "https://www.gnu.org/software/bison/")
  59. (synopsis "Yacc-compatible parser generator")
  60. (description
  61. "GNU Bison is a general-purpose parser generator. It can build a
  62. deterministic or generalized LR parser from an annotated, context-free
  63. grammar. It is versatile enough to have many applications, from parsers for
  64. simple tools through complex programming languages.
  65. Bison also provides an implementation of @command{yacc}, as specified by POSIX.")
  66. (license gpl3+)))
  67. (define-public bison-3.0
  68. (package
  69. (inherit bison)
  70. (version "3.0.5")
  71. (source
  72. (origin
  73. (method url-fetch)
  74. (uri (string-append "mirror://gnu/bison/bison-"
  75. version ".tar.xz"))
  76. (sha256
  77. (base32
  78. "0f7kjygrckkx8vas2nm673592jif0a9mw5g8207f6hj6h4pfyp07"))))))