Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,20 @@ install-nix-action's own `extra_nix_config` input:
substituters = https://hydra.iohk.io https://cache.nixos.org/
```

### How do I use `nix develop`?
Comment thread
jennydaman marked this conversation as resolved.
Resolved

`nix develop` can be used for `steps[*].shell`.

```yaml
# optional step: build devShell in advance for accuracy of subsequent step timing and result
Comment thread
jennydaman marked this conversation as resolved.
Resolved
- name: Build devShell
run: nix build --no-link .#devShell.$(uname -m)-linux
Comment thread
jennydaman marked this conversation as resolved.
Resolved

- name: Run a command with nix develop
shell: 'nix develop -c bash -e {0}'
run: echo "hello, pure world!"
```

### How do I pass environment variables to commands run with `nix develop` or `nix shell`?

Nix runs commands in a restricted environment by default, called `pure mode`.
Expand Down