diff --git a/Dockerfile b/Dockerfile index 2e23277..3f085d3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -42,7 +42,7 @@ RUN mkdir -p $HOME/.vscode-server/data/Machine/ \ # FIXME: Consider moving this script into a Nix `writeShellApplication` trivial builder within the closure ... # ... but that means I should figure it out how to pass to it $COMPILER_NIX_NAME as input? RUN mkdir -p /usr/local/bin/ \ - && cat <> /usr/local/bin/post-create-command + && cat <> /usr/local/bin/on-create-command #!/usr/bin/env bash PROJECT_DIR=\$(find /workspaces/ -mindepth 1 -maxdepth 1 -type d ! -name '.*' -print -quit) @@ -53,7 +53,6 @@ if [ -n "\$PROJECT_DIR" ]; then bash -ic "cabal update" # GitHub Codespaces should have \$GITHUB_TOKEN already set. if [ -n "\$GITHUB_TOKEN" ]; then - echo \$GITHUB_TOKEN | gh auth login --with-token COMMIT_HASH=\$(git rev-parse HEAD) echo "Attempting to download HLS cache from GitHub Artifact (cache-\$COMMIT_HASH-$COMPILER_NIX_NAME) for faster first launch ..." gh run download -D .download -n "cache-\$COMMIT_HASH-$COMPILER_NIX_NAME" @@ -65,4 +64,4 @@ if [ -n "\$PROJECT_DIR" ]; then popd > /dev/null fi EOF -RUN chmod +x /usr/local/bin/post-create-command +RUN chmod +x /usr/local/bin/on-create-command diff --git a/README.md b/README.md index cbe0fc8..91b221f 100644 --- a/README.md +++ b/README.md @@ -59,16 +59,17 @@ Refer to [`direnv` and `devx`](./docs/direnv.md) guide for more information. ## VSCode DevContainer / GitHub CodeSpace support To make this developer shell available in VSCode DevContainer or GitHub CodeSpace, simply add a file named `.devcontainer/devcontainer.json` with the following content: -```json +```jsonc { "image":"ghcr.io/input-output-hk/devx-devcontainer:x86_64-linux.ghc96-iog", - "postCreateCommand": "post-create-command", + "onCreateCommand": "on-create-command", "customizations":{ "vscode":{ "extensions":[ "haskell.haskell" ] } + // Do not set custom `settings` as they would override devx-container defaults... } } ``` @@ -106,7 +107,7 @@ There are various flavors available as suffixes to the compiler names (e.g. `#gh These can then be combined following this schema: ``` -#ghc[-js|-windows|-static][-minimal][-iog] +#ghc[-js|-windows|-static][-minimal][-iog|-iog-full] ``` For example: ```bash