1
+ # List the start up tasks. Learn more https://www.gitpod.io/docs/config-start-tasks/
2
+ tasks :
3
+ - before : |
4
+ # Only the /workspace folder is persistent
5
+ export XDG_DATA_HOME=/workspace/.local/share
6
+ export XDG_CONFIG_HOME=/workspace/.local/config
7
+ export XDG_STATE_HOME=/workspace/.local/state
8
+ export XDG_CACHE_HOME=/workspace/.cache
9
+ export CABAL_DIR=/workspace/.cabal
10
+ export STACK_ROOT=/workspace/.stack
11
+
12
+ # install ghcup, ghc and cabal
13
+ export GHCUP_INSTALL_BASE_PREFIX=/workspace
14
+ export BOOTSTRAP_HASKELL_NONINTERACTIVE=1
15
+ export BOOTSTRAP_HASKELL_MINIMAL=1
16
+ curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh
17
+ /workspace/.ghcup/bin/ghcup install ghc --set
18
+ /workspace/.ghcup/bin/ghcup install cabal
19
+
20
+ # Add ghcup binaries to the PATH since VSCode does not see 'source .ghcup/env'
21
+ pushd /usr/local/bin
22
+ sudo ln -s /workspace/.ghcup/bin/* /usr/local/bin
23
+ popd
24
+
25
+ # Fix the Cabal dir since VSCode does not see CABAL_DIR
26
+ cabal update
27
+ echo "Symlinking /workspace/.cabal to ~/.cabal"
28
+ ln -s /workspace/.cabal ~
29
+
30
+ # Configure VSCode to use the locally built version of HLS
31
+ mkdir -p .vscode
32
+ echo '{ "haskell.serverExecutablePath": "/workspace/.cabal/bin/haskell-language-server" }' > .vscode/settings.json
33
+
34
+ init: |
35
+ cabal configure --enable-executable-dynamic
36
+ cabal build --enable-tests
37
+ cabal install exe:haskell-language-server
38
+ command: |
39
+ cabal build --enable-tests
40
+
41
+ # List the ports to expose. Learn more https://www.gitpod.io/docs/config-ports/
42
+ ports : []
43
+
44
+ github :
45
+ prebuilds :
46
+ # enable for the master/default branch (defaults to true)
47
+ master : true
48
+ # enable for all branches in this repo (defaults to false)
49
+ branches : false
50
+ # enable for pull requests coming from this repo (defaults to true)
51
+ pullRequests : true
52
+ # enable for pull requests coming from forks (defaults to false)
53
+ pullRequestsFromForks : true
54
+ # add a "Review in Gitpod" button as a comment to pull requests (defaults to true)
55
+ addComment : false
56
+ # add a "Review in Gitpod" button to pull requests (defaults to false)
57
+ addBadge : false
58
+ # add a label once the prebuild is ready to pull requests (defaults to false)
59
+ addLabel : prebuilt-in-gitpod
60
+
61
+ vscode :
62
+ extensions :
63
+ - " haskell.haskell"
64
+ - " justusadam.language-haskell"
65
+ - " usernamehw.errorlens"
0 commit comments