Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[flakes] remove shell hook #671

Merged
merged 1 commit into from
Feb 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 0 additions & 25 deletions internal/impl/tmpl/flake.nix.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -16,31 +16,6 @@

in {
devShell = pkgs.mkShell {
shellHook =
''
# We're technically no longer in a Nix shell after this hook because we
# exec a devbox shell.
export IN_NIX_SHELL=0
export DEVBOX_SHELL_ENABLED=1

# Undo the effects of "nix-shell --pure" on SSL certs.
# See https://github.com/NixOS/nixpkgs/blob/dae204faa0243b4d0c0234a5f5f83a2549ecb5b7/pkgs/stdenv/generic/setup.sh#L677-L685
if [ "$NIX_SSL_CERT_FILE" = "/no-cert-file.crt" ]; then
unset NIX_SSL_CERT_FILE
fi
if [ "$SSL_CERT_FILE" = "/no-cert-file.crt" ]; then
unset SSL_CERT_FILE
fi

# Append the parent shell's PATH so that we retain access to
# non-Nix programs, while still preferring the Nix ones.
export "PATH=$PATH:$PARENT_PATH"

{{ if debug }}
echo "PATH=$PATH"
{{- end }}
'';

buildInputs = with pkgs; [
{{- range .DevPackages}}
{{.}}
Expand Down