1
0
Fork 0
mirror of https://git.madhouse-project.org/actions/nix.git synced 2024-10-17 08:14:41 +02:00
nix/develop/bin/nix-develop

14 lines
306 B
Text
Raw Normal View History

#! /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 -eo pipefail "${workdir}/run.sh"