summary refs log tree commit diff
path: root/gnu/packages/flex.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2013-09-29 12:44:25 +0200
committerLudovic Courtès <ludo@gnu.org>2013-09-29 12:44:25 +0200
commit2aa76ee14a1adecf2ff51ac45ed3df73055388e5 (patch)
treeb752fd2a3a2f742af23d01dcf230c1de53e751a3 /gnu/packages/flex.scm
parent9546640ecc17f7eec27ebd4016da6b006cf83eb0 (diff)
downloadguix-2aa76ee14a1adecf2ff51ac45ed3df73055388e5.tar.gz
gnu: flex: Use Bison 2.7 for tests.
* gnu/packages/bison.scm (bison): Move FLEX to 'inputs', and remove the
  hack that turned off its test suite.
* gnu/packages/flex.scm (flex): Add 'bison-for-tests' in 'inputs', and
  use that to run the tests.
Diffstat (limited to 'gnu/packages/flex.scm')
-rw-r--r--gnu/packages/flex.scm24
1 files changed, 21 insertions, 3 deletions
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")