Artifact 737d33f6f91f1b4545a79bff1cd737054594c7b4b37f7303ed8b2d044f240f08:

  • Executable file services/sandbox — part of check-in [5c60bb39c4] at 2025-04-18 12:50:54 on branch trunk — fix exit 100 feature, allow skipping nixpkgs by touching ~/bws_skip_nixpkgs file and remove it to re-enable (user: toby size: 775)

#!/bin/bash

if [ -e $HOME/bws_skip_nixpkgs ]; then                                                                                  
  $HOME/services/_sandbox $*                                                                                            
  exit $?                                                                                                               
fi 

# Add support for nix-shell if available
if [[ -e "shell.nix" && $(which nix-shell) ]]; then
  echo Loading Nix packages
  nix-shell --run "$HOME/services/_sandbox $*"
elif [[ -e "packages.nix" && $(which nix-shell) ]]; then
  echo Loading Nix packages
  nix-shell -p $(xargs -a packages.nix echo) --run "$HOME/services/_sandbox $*"
else
  $HOME/services/_sandbox $*
fi

retVal=$?
exit $retVal