Skip to content

Commit 516df83

Browse files
committed
doc: contributing with shell.nix
1 parent 2197934 commit 516df83

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

.github/CONTRIBUTING.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,20 @@ docker run --rm -it -v "$(pwd)":/project -w /project alpine:latest \
9494
sh -c "apk add bash make shellcheck git && make test"
9595
```
9696

97+
##### NixOS
98+
99+
If you are using NixOS, you can enter a shell with all the required tools using the provided `shell.nix`:
100+
101+
```bash
102+
nix-shell --pure --run "./bashunit --simple"
103+
```
104+
105+
Alternatively, if you just need Bash for a one-time execution and don’t want to rely on the `shell.nix` file:
106+
107+
```bash
108+
nix-shell -p bash --run "./bashunit --simple"
109+
```
110+
97111
## Coding Guidelines
98112

99113
### ShellCheck

shell.nix

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{ pkgs ? import <nixpkgs> {} }:
2+
3+
pkgs.mkShell {
4+
buildInputs = [
5+
pkgs.bashInteractive
6+
pkgs.git
7+
pkgs.curl
8+
pkgs.perl
9+
];
10+
}

0 commit comments

Comments
 (0)