You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/yaml_configuration.md
+65-1Lines changed: 65 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1198,5 +1198,69 @@ has the following effect:
1198
1198
1199
1199
This field is convenient in setups that restrict access to GitHub, for instance closed corporate setups. In this setting, it is common for the development environment to have general access to the internet, but not for testing/building environments. To avoid the firewall, one can run a local snapshots mirror and then use a custom `snapshot-location-base` in the closed environments only.
1200
1200
1201
-
1202
1201
Since 2.5.0
1202
+
1203
+
## Customisation
1204
+
1205
+
### GHC installation customisation (experimental)
1206
+
1207
+
On Unix-like operating systems and Windows, Stack's installation procedure can
1208
+
be fully customised by placing a `sh` shell script (a 'hook') in the Stack root
1209
+
directory at `hooks/ghc-install.sh`. On Unix-like operating systems, the script
1210
+
file must be made executable. The script is run by the `sh` application (which
1211
+
is provided by MSYS2 on Windows).
1212
+
1213
+
The script **must** return an exit code of `0` and the standard output **must**
1214
+
be the absolute path to the GHC binary that was installed. Otherwise Stack will
1215
+
ignore the script and possibly fall back to its own installation procedure.
1216
+
1217
+
The script is not run when `system-ghc: true`.
1218
+
1219
+
When `install-ghc: false`, the script is still run, which allows you to ensure
1220
+
that only your script will install GHC and Stack won't default to its own
1221
+
installation logic, even when the script fails.
1222
+
1223
+
An example script is:
1224
+
1225
+
```sh
1226
+
#!/bin/sh
1227
+
1228
+
set -eu
1229
+
1230
+
case $HOOK_GHC_TYPE in
1231
+
bindist)
1232
+
# install GHC here, not printing to stdout, e.g.:
1233
+
# command install $HOOK_GHC_VERSION >/dev/null
1234
+
;;
1235
+
git)
1236
+
>&2 echo "Hook doesn't support installing from source"
0 commit comments