1
0
Fork 0
mirror of https://git.madhouse-project.org/actions/nix.git synced 2024-11-23 20:19:16 +01:00
nix/develop/bin/nix-develop
Gergely Nagy 18b41c0333 Add a nix/shell action
Since it's basically the same as `nix/develop`, with only the nix
command changed, leverage the existing script.

Signed-off-by: Gergely Nagy <me@gergo.csillger.hu>
2023-09-22 21:43:51 +02:00

13 lines
293 B
Bash
Executable file

#! /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"