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
+17-15Lines changed: 17 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1197,27 +1197,29 @@ has the following effect:
1197
1197
1198
1198
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.
1199
1199
1200
-
1201
1200
Since 2.5.0
1202
1201
1203
-
## Hooks
1202
+
## Customisation
1204
1203
1205
-
### GHC installation hooks (experimental)
1204
+
### GHC installation customisation (experimental)
1206
1205
1207
-
Stack's installation procedure can be fully customized by placing a shell script at
1208
-
`~/.stack/hooks/ghc-install.sh`and making it executable.
1206
+
On Unix-like operating systems and Windows, Stack's installation procedure can
1207
+
be fully customised by placing a `sh` shell script (a 'hook') in the Stack root
1208
+
directory at `hooks/ghc-install.sh`. On Unix-like operating systems, the script
1209
+
file must be made executable. The script is run by the `sh` application (which
1210
+
is provided by MSYS2 on Windows).
1209
1211
1210
-
The script **must** return an exit code of `0` and the standard output **must** be the
1211
-
absolute path to the ghc binary that was installed. Otherwise stack will ignore
1212
-
the hook and possibly fall back to its own installation procedure.
1212
+
The script **must** return an exit code of `0` and the standard output **must**
1213
+
be the absolute path to the GHC binary that was installed. Otherwise Stack will
1214
+
ignore the script and possibly fall back to its own installation procedure.
1213
1215
1214
-
Hooks are not run when `system-ghc: true`.
1216
+
The script is not run when `system-ghc: true`.
1215
1217
1216
-
When `install-ghc: false`, hooks are still run,
1217
-
which allows you to ensure that only your hook will install GHC and stack won't default
1218
-
to its own installation logic, even when the hook fails.
1218
+
When `install-ghc: false`, the script is still run, which allows you to ensure
1219
+
that only your script will install GHC and Stack won't default to its own
1220
+
installation logic, even when the script fails.
1219
1221
1220
-
An example hook is:
1222
+
An example script is:
1221
1223
1222
1224
```sh
1223
1225
#!/bin/sh
@@ -1242,7 +1244,7 @@ esac
1242
1244
echo "location/to/ghc/executable"
1243
1245
```
1244
1246
1245
-
The following environment variables are always passed to the hook:
1247
+
The following environment variables are always available to the script:
1246
1248
1247
1249
* `HOOK_GHC_TYPE = "bindist" | "git" | "ghcjs"`
1248
1250
@@ -1260,4 +1262,4 @@ For "ghcjs", additional variables are:
0 commit comments