Skip to contents

using_nix_shell() checks whether code is running within an environment defined by a Nix expression.

Usage

using_nix_shell(pure = NULL)

Arguments

pure

Whether or not the environment is pure, meaning most environment variables have been cleared before the shell started.

Value

A logical value

Examples

# Check for Nix
using_nix_shell()
#> [1] FALSE

# Check for Nix in a pure environment
using_nix_shell(pure = TRUE)
#> [1] FALSE