reflex-frp / reflex-platform

A curated package set and set of tools that let you build Haskell packages so they can run on a variety of platforms. reflex-platform is built on top of the nix package manager.
https://reflex-frp.org
BSD 3-Clause "New" or "Revised" License
723 stars 164 forks source link

`System.Environment` and Android #838

Open danwdart opened 2 months ago

danwdart commented 2 months ago

Hi, I am having trouble importing environment variables via System.Environment - passing the correct env var to nix-build even with --impure does not include the variable in the built apk file (I'm setting a hostname for instance). Is there something I'm missing? Do I need to provide it in another file or something?

Thanks!

ymeister commented 2 months ago

I think, what you need here is a config/hostname folder/file (or, what is commonly used for obelisk apps config/common/route) that you would include in your APK build as an asset and import in your haskell code by directly reading it from said file.