Conditional selection of integer simple in Stack

Viewed 192

Due to licensing constraints, we need to use the integer-simple variant of GHC when compiling in Windows platforms. Currently this is specified in our stack.yaml file:

ghc-variant: integersimple
# ...
extra-deps:
- text-1.2.2.1
# Override default flag values for local packages and extra-deps
flags: 
  text: 
    integer-simple: true

However, this won't work on Linux.

It'd be nice a way to conditionally include the code above depending on the host architecture. Is there a way of doing this using stack, and if not, how would you go about solving this problem?

The only alternative I can think about right now is having two stack files, but I'd like to avoid that.

1 Answers
Related