Skip to content

Commit a6c51dd

Browse files
committed
Restore "devx" wrapper name for action compatibility
The devShellTools migration (a354771) renamed the writeTextFile wrapper from "devx" to "${name}-env.sh", breaking compatibility with input-output-hk/actions/devx/action.yml which greps for "devx" in the imported store paths. Restore the fixed "devx" name and update the matching patterns in ghcr-upload.sh and Dockerfile accordingly.
1 parent 9fec796 commit a6c51dd

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ if [ -n "\$VSCODE_IPC_HOOK_CLI" ]; then
2828
mkdir -p "\$(dirname "\$VSCODE_IPC_HOOK_CLI")"
2929
fi
3030
# This line is the one that actually brings DevX devshell ...
31-
source $(grep -m 1 -e '-env.sh$' store-paths.txt)
31+
source $(grep -m 1 -e 'devx$' store-paths.txt)
3232
EOF
3333

3434
# This enforce those settings in DevContainer whatever "Settings Sync" user preferences ...

extra/ghcr-upload.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ nix-store -r "$SHELL_NIX_PATH" || nix-store -r "$SHELL_NIX_PATH" || nix-store -r
1414
CLOSURE_PATHS=$(nix-store -qR "$SHELL_NIX_PATH")
1515
nix-store --export $CLOSURE_PATHS | zstd -z8T8 >${DEV_SHELL}
1616
# Verify the environment script is included in the closure.
17-
# The script filename ends with -env.sh (e.g., ghc96-env.sh, ghc98-static-iog-env.sh).
18-
if ! echo "$CLOSURE_PATHS" | grep -q -- "-env\.sh$"; then exit 1; fi
17+
# The wrapper script is always named "devx" for compatibility with
18+
# input-output-hk/actions/devx/action.yml which matches on that name.
19+
if ! echo "$CLOSURE_PATHS" | grep -q "devx$"; then exit 1; fi
1920
oras push ghcr.io/input-output-hk/devx:${DEV_SHELL} ${DEV_SHELL}

flake.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@
362362
shellHook = drv.shellHook or "";
363363

364364
in pkgs.writeTextFile {
365-
name = "${name}-env.sh";
365+
name = "devx";
366366
executable = true;
367367
text = ''
368368
#! /usr/bin/env nix-shell

0 commit comments

Comments
 (0)