Skip to content

Commit b197c4e

Browse files
committed
fix: replace nix by devbox
1 parent 0acb805 commit b197c4e

File tree

7 files changed

+657
-94
lines changed

7 files changed

+657
-94
lines changed

.envrc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
# Automatically load the Nix flake environment
2-
use flake
1+
# Automatically load the Devbox environment
2+
eval "$(devbox generate direnv --print-envrc)"

README.md

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ For more details on chart configuration options, see the [chart documentation](c
6969
### Prerequisites
7070

7171
- [direnv](https://direnv.net/)
72-
- [Nix](https://nixos.org/download.html)
72+
- [Devbox](https://www.jetify.com/devbox/docs/installing_devbox/)
7373

7474
### Setting Up the Development Environment
7575

@@ -80,17 +80,42 @@ For more details on chart configuration options, see the [chart documentation](c
8080
cd crossplane-function-js
8181
```
8282

83-
2. Allow direnv:
83+
2. Allow direnv to load the Devbox environment:
8484

8585
```bash
8686
direnv allow
8787
```
8888

89+
This will automatically activate the Devbox development environment with all required tools:
90+
- Node.js (latest)
91+
- Go (latest)
92+
- Yarn (latest)
93+
- Kubernetes tools (kubectl, helm, kind, k9s)
94+
- Development utilities (jq, go-task)
95+
8996
3. Install dependencies:
9097
```bash
9198
yarn
9299
```
93100

101+
### Development Tools
102+
103+
The development environment provides the following tools via Devbox:
104+
105+
- **Node.js**: Latest version for JavaScript/TypeScript development
106+
- **Go**: Latest version for the gRPC server
107+
- **Yarn**: Package manager for Node.js dependencies
108+
- **kubectl**: Kubernetes command-line tool
109+
- **Helm**: Kubernetes package manager
110+
- **Kind**: Kubernetes in Docker for local testing
111+
- **K9s**: Terminal-based Kubernetes cluster management
112+
- **jq**: JSON processor for data manipulation
113+
- **go-task**: Task runner for development workflows
114+
115+
The environment is automatically configured with:
116+
- `KUBECONFIG` set to `$PWD/.kubeconfig` for local cluster management
117+
- All tools available in the shell PATH
118+
94119
## Usage
95120

96121
### Creating a Composition with Inline Code

devbox.json

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.16.0/.schema/devbox.schema.json",
3+
"packages": [
4+
"git",
5+
"nodejs@latest",
6+
"yarn@latest",
7+
"jq@latest",
8+
"go@latest",
9+
"go-task@latest",
10+
"kubectl@latest",
11+
"kubernetes-helm@latest",
12+
"kind@latest",
13+
"k9s@latest"
14+
],
15+
"shell": {
16+
"init_hook": [
17+
"# Set up local KUBECONFIG",
18+
"export KUBECONFIG=\"$PWD/.kubeconfig\"",
19+
"",
20+
"# Create .kubeconfig if it doesn't exist",
21+
"if [ ! -f \"$KUBECONFIG\" ]; then",
22+
" echo \"Creating empty .kubeconfig file\"",
23+
" touch \"$KUBECONFIG\"",
24+
"fi",
25+
"",
26+
"echo \"KUBECONFIG set to $KUBECONFIG\"",
27+
"echo \"Development environment ready with latest tools!\""
28+
],
29+
"scripts": {
30+
"test": [
31+
"echo \"Error: no test specified\" && exit 1"
32+
]
33+
}
34+
}
35+
}
36+

0 commit comments

Comments
 (0)