Skip to content

Commit e5b739b

Browse files
authored
[flakes] remove shell hook (#671)
## Summary #635 hid the shell hook from `shell.nix` behind the unified-env flag (where shell hook is active when flag is OFF). So, this PR removes it from `flake.nix`, since flakes depend on unified-env being turned on. ## How was it tested? opened `devbox shell` in `examples/testdata/go/go-1.19` project
1 parent 4c00cf3 commit e5b739b

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

internal/impl/tmpl/flake.nix.tmpl

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -16,31 +16,6 @@
1616

1717
in {
1818
devShell = pkgs.mkShell {
19-
shellHook =
20-
''
21-
# We're technically no longer in a Nix shell after this hook because we
22-
# exec a devbox shell.
23-
export IN_NIX_SHELL=0
24-
export DEVBOX_SHELL_ENABLED=1
25-
26-
# Undo the effects of "nix-shell --pure" on SSL certs.
27-
# See https://github.com/NixOS/nixpkgs/blob/dae204faa0243b4d0c0234a5f5f83a2549ecb5b7/pkgs/stdenv/generic/setup.sh#L677-L685
28-
if [ "$NIX_SSL_CERT_FILE" = "/no-cert-file.crt" ]; then
29-
unset NIX_SSL_CERT_FILE
30-
fi
31-
if [ "$SSL_CERT_FILE" = "/no-cert-file.crt" ]; then
32-
unset SSL_CERT_FILE
33-
fi
34-
35-
# Append the parent shell's PATH so that we retain access to
36-
# non-Nix programs, while still preferring the Nix ones.
37-
export "PATH=$PATH:$PARENT_PATH"
38-
39-
{{ if debug }}
40-
echo "PATH=$PATH"
41-
{{- end }}
42-
'';
43-
4419
buildInputs = with pkgs; [
4520
{{- range .DevPackages}}
4621
{{.}}

0 commit comments

Comments
 (0)