Skip to content

Commit

Permalink
Introduce flag to disable build-tool-depends: alex
Browse files Browse the repository at this point in the history
In particular, this flag can then be used by `ghc` to provide source
distributions that can be built using `ghc` only.

Fixes haskell#10061
  • Loading branch information
alt-romes committed Jun 12, 2024
1 parent 305033b commit 96b95c3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Cabal-syntax/Cabal-syntax.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ source-repository head
location: https://github.com/haskell/cabal/
subdir: Cabal-syntax

flag no-alex
description: Disable the build-tool dependency on alex
manual: True
default: False

library
default-language: Haskell2010
hs-source-dirs: src
Expand Down Expand Up @@ -59,7 +64,8 @@ library
if impl(ghc >= 8.0) && impl(ghc < 8.8)
ghc-options: -Wnoncanonical-monadfail-instances

build-tool-depends: alex:alex
if !flag(no-alex)
build-tool-depends: alex:alex

exposed-modules:
Distribution.Backpack
Expand Down

0 comments on commit 96b95c3

Please sign in to comment.