diff options
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/packages/bison.scm | 13 | ||||
-rw-r--r-- | gnu/packages/flex.scm | 24 |
2 files changed, 23 insertions, 14 deletions
diff --git a/gnu/packages/bison.scm b/gnu/packages/bison.scm index eafce34b52..2d2209c4ff 100644 --- a/gnu/packages/bison.scm +++ b/gnu/packages/bison.scm @@ -40,17 +40,8 @@ (base32 "1j14fqgi9wzqgsy4fhkcdrv4hv6rrvhvn84axs520w9b022mbb79")))) (build-system gnu-build-system) - (native-inputs `(("perl" ,perl) - - ;; We need Flex for the test suite, and Flex needs Bison. - ;; To break the cycle, we remove Bison from the inputs of - ;; Flex, and disable Flex's test suite, since it requires - ;; Bison. - ("flex" ,(package (inherit flex) - (arguments '(#:tests? #f)) - (inputs - (alist-delete "bison" - (package-inputs flex))))))) + (native-inputs `(("perl" ,perl))) + (inputs `(("flex" ,flex))) (propagated-inputs `(("m4" ,m4))) (home-page "http://www.gnu.org/software/bison/") (synopsis "Parser generator") diff --git a/gnu/packages/flex.scm b/gnu/packages/flex.scm index beddb620a7..3dc7372acb 100644 --- a/gnu/packages/flex.scm +++ b/gnu/packages/flex.scm @@ -25,6 +25,7 @@ #:use-module (gnu packages m4) #:use-module (gnu packages bison) #:use-module (gnu packages indent) + #:use-module (srfi srfi-1) #:export (flex)) (define flex @@ -41,9 +42,26 @@ (build-system gnu-build-system) (arguments '(#:patches (list (assoc-ref %build-inputs "patch/bison-tests")))) - (inputs `(("patch/bison-tests" ,(search-patch "flex-bison-tests.patch")) - ("bison" ,bison) - ("indent" ,indent))) + (inputs + (let ((bison-for-tests + ;; Work around an incompatibility with Bison 3.0: + ;; <http://lists.gnu.org/archive/html/bug-bison/2013-09/msg00014.html>. + (package (inherit bison) + (version "2.7.1") + (source (origin + (method url-fetch) + (uri (string-append "mirror://gnu/bison/bison-" + version ".tar.xz")) + (sha256 + (base32 + "1yx7isx67sdmyijvihgyra1f59fwdz7sqriginvavfj5yb5ss2dl")))) + + ;; Unlike Bison 3.0, this version did not need Flex for its + ;; tests, so it allows us to break the cycle. + (inputs (alist-delete "flex" (package-inputs bison)))))) + `(("patch/bison-tests" ,(search-patch "flex-bison-tests.patch")) + ("bison" ,bison-for-tests) + ("indent" ,indent)))) (propagated-inputs `(("m4" ,m4))) (home-page "http://flex.sourceforge.net/") (synopsis "A fast lexical analyser generator") |