mirror of
https://git.madhouse-project.org/actions/nix.git
synced 2025-05-09 21:59:53 +02:00
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>
This commit is contained in:
parent
63e7eb4047
commit
18b41c0333
6 changed files with 109 additions and 1 deletions
|
@ -5,4 +5,9 @@ workdir="$(mktemp -d)"
|
|||
trap 'rm -rf "$workdir"' EXIT
|
||||
echo "${INPUT_RUN}" >"${workdir}/run.sh"
|
||||
|
||||
nix develop "${INPUT_FLAKE}#${INPUT_PACKAGE}" -c bash "${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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue