#! /usr/bin/env bash set -eo pipefail workdir="$(mktemp -d)" trap 'rm -rf "$workdir"' EXIT echo "${INPUT_RUN}" >"${workdir}/run.sh" __cmd="develop" if [ "$(basename $0)" = "nix-shell" ]; then __cmd="shell" fi nix "${__cmd}" "${INPUT_FLAKE}#${INPUT_PACKAGE}" -c bash "${workdir}/run.sh"