mirror of
https://github.com/cachix/install-nix-action.git
synced 2025-09-21 15:49:12 +00:00
Reword README.md section on nix develop
Addresses feedback from @sandydoo https://github.com/cachix/install-nix-action/pull/248#pullrequestreview-3121533041
This commit is contained in:
parent
ca6a0fa535
commit
a23271bac0
1 changed files with 7 additions and 5 deletions
12
README.md
12
README.md
|
@ -155,14 +155,16 @@ install-nix-action's own `extra_nix_config` input:
|
||||||
substituters = https://hydra.iohk.io https://cache.nixos.org/
|
substituters = https://hydra.iohk.io https://cache.nixos.org/
|
||||||
```
|
```
|
||||||
|
|
||||||
### How do I use `nix develop`?
|
### How do I configure steps to use my flake's development environment?
|
||||||
|
|
||||||
`nix develop` can be used for `steps[*].shell`.
|
You can configure [`jobs.<job_id>.steps[*].shell`](https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#jobsjob_idstepsshell)
|
||||||
|
to use `nix develop`.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
# optional step: build devShell in advance for accuracy of subsequent step timing and result
|
# (optional) pre-build the shell separately to avoid skewing the run time of the next
|
||||||
- name: Build devShell
|
# step and have clear point of failure should the shell fail to build
|
||||||
run: nix build --no-link .#devShell.$(uname -m)-linux
|
- name: Pre-build devShell
|
||||||
|
run: nix build --no-link .#devShells.$(nix eval --impure --raw --expr 'builtins.currentSystem').default
|
||||||
|
|
||||||
- name: Run a command with nix develop
|
- name: Run a command with nix develop
|
||||||
shell: 'nix develop -c bash -e {0}'
|
shell: 'nix develop -c bash -e {0}'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue