aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--guix/import/opam.scm4
-rw-r--r--tests/opam.scm4
2 files changed, 5 insertions, 3 deletions
diff --git a/guix/import/opam.scm b/guix/import/opam.scm
index c254db5f2c..6ffb16b49b 100644
--- a/guix/import/opam.scm
+++ b/guix/import/opam.scm
@@ -90,8 +90,8 @@
(define-peg-pattern condition-lower all (and (ignore "<") (* SP) condition-string))
(define-peg-pattern condition-and all (and condition-form2 (* SP) (? (ignore "&")) (* SP) condition-form))
(define-peg-pattern condition-or all (and condition-form2 (* SP) (ignore "|") (* SP) condition-form))
-(define-peg-pattern condition-eq all (and condition-content (* SP) (ignore "=") (* SP) condition-content))
-(define-peg-pattern condition-neq all (and condition-content (* SP) (ignore (and "!" "=")) (* SP) condition-content))
+(define-peg-pattern condition-eq all (and (? condition-content) (* SP) (ignore "=") (* SP) condition-content))
+(define-peg-pattern condition-neq all (and (? condition-content) (* SP) (ignore (and "!" "=")) (* SP) condition-content))
(define-peg-pattern condition-content body (or condition-string condition-var))
(define-peg-pattern condition-content2 body (and condition-content (* SP) (not-followed-by (or "&" "=" "!"))))
(define-peg-pattern condition-string all (and QUOTE (* STRCHR) QUOTE))
diff --git a/tests/opam.scm b/tests/opam.scm
index e0ec5ef3d4..e8c0d15198 100644
--- a/tests/opam.scm
+++ b/tests/opam.scm
@@ -192,6 +192,8 @@ url {
("{>= \"0.2.0\" | build}" . (condition-or
(condition-greater-or-equal
(condition-string "0.2.0"))
- (condition-var "build"))))))
+ (condition-var "build")))
+ ("{ = \"1.0+beta19\" }" . (condition-eq
+ (condition-string "1.0+beta19"))))))
(test-end "opam")