Skip to content

Instantly share code, notes, and snippets.

@bigos
Last active December 3, 2017 00:42
Show Gist options
  • Save bigos/bf618c2a092e056597e83fd9030f815b to your computer and use it in GitHub Desktop.
Save bigos/bf618c2a092e056597e83fd9030f815b to your computer and use it in GitHub Desktop.
Environment used for experimenting with Haskell

Haskell installation experiment

download core Haskell platform

https://www.haskell.org/platform/

Install it to a destination folder without spaces

update mingw64 terminal

pacman -Syu, then kill the terminal when prompted restart it and resume update with pacman -Su

install required packages

pacman -S mingw64/mingw-w64-x86_64-pkg-config mingw64/mingw-w64-x86_64-clutter mingw64/mingw-w64-x86_64-gobject-introspection

configure stack for use without msys

As per instructions in https://docs.haskellstack.org/en/stable/yaml_configuration/ add in c:/sr/config.yaml the following

skip-msys: true

configure cabal user settings

Find configuration file.

c:/Users/IEUser/Documents/hello $ cabal user-config init
Writing default configuration to C:\Users\IEUser\AppData\Roaming\cabal\config

Edit configuration file to include:

-- flags:
extra-include-dirs: c:/msys64/mingw64/include
-- deterministic:
-- cid:
extra-lib-dirs: c:/msys64/mingw64/lib
-- extra-framework-dirs:
extra-prog-path: [C:\Users\IEUser\AppData\Roaming\cabal\bin, c:/msys64/mingw64/bin, c:/msys64/usr/bin]
-- instantiate-with:

create script with environment variables

A script that is used to launch all the building operations should have the following environment variables set.

set PATH=C:\msys64\mingw64\bin;C:\msys64\usr\bin;%PATH%

set XDG_DATA_DIRS=c:/msys64/mingw64/share
set PKG_CONFIG_PATH=c:/msys64/mingw64/lib/pkgconfig
set HASKELL_GI_GIR_SEARCH_PATH=c:/msys64/mingw64/share/gir-1.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment