Skip to content

Commit 20b9a30

Browse files
committed
Debugging
1 parent 86fe182 commit 20b9a30

File tree

3 files changed

+90
-19
lines changed

3 files changed

+90
-19
lines changed

devbox.json

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
2-
"name": "devbox",
2+
"name": "devbox",
33
"description": "Instant, easy, and predictable development environments",
44
"packages": {
5-
"go": "latest",
5+
"go": "latest",
66
"runx:golangci/golangci-lint": "latest",
7-
"runx:mvdan/gofumpt": "latest",
7+
"runx:mvdan/gofumpt": "latest",
88
},
99
"env": {
1010
"GOENV": "off",
11-
"PATH": "$PATH:$PWD/dist",
11+
"PATH": "$PATH:$PWD/dist",
1212
},
1313
"shell": {
1414
"init_hook": [
@@ -20,24 +20,24 @@
2020
],
2121
"scripts": {
2222
// Build devbox for the current platform
23-
"build": "go build -o dist/devbox ./cmd/devbox",
23+
"build": "go build -o dist/devbox ./cmd/devbox",
2424
"build-darwin-amd64": "GOOS=darwin GOARCH=amd64 go build -o dist/devbox-darwin-amd64 ./cmd/devbox",
2525
"build-darwin-arm64": "GOOS=darwin GOARCH=arm64 go build -o dist/devbox-darwin-arm64 ./cmd/devbox",
26-
"build-linux-amd64": "GOOS=linux GOARCH=amd64 go build -o dist/devbox-linux-amd64 ./cmd/devbox",
27-
"build-linux-arm64": "GOOS=linux GOARCH=arm64 go build -o dist/devbox-linux-arm64 ./cmd/devbox",
26+
"build-linux-amd64": "GOOS=linux GOARCH=amd64 go build -o dist/devbox-linux-amd64 ./cmd/devbox",
27+
"build-linux-arm64": "GOOS=linux GOARCH=arm64 go build -o dist/devbox-linux-arm64 ./cmd/devbox",
2828
"build-all": [
2929
"devbox run build-darwin-amd64",
3030
"devbox run build-darwin-arm64",
3131
"devbox run build-linux-amd64",
3232
"devbox run build-linux-arm64",
3333
],
3434
// Open VSCode
35-
"code": "code .",
36-
"lint": "golangci-lint run --timeout 5m && scripts/gofumpt.sh",
37-
"fmt": "scripts/gofumpt.sh",
38-
"test": "go test -race -cover ./...",
39-
"test-projects-only": "DEVBOX_RUN_PROJECT_TESTS=1 go test -v -timeout ${DEVBOX_GOLANG_TEST_TIMEOUT:-30m} ./... -run \"TestExamples|TestScriptsWithProjects\"",
40-
"update-examples": "devbox run build && go run testscripts/testrunner/updater/main.go",
35+
"code": "code .",
36+
"lint": "golangci-lint run --timeout 5m && scripts/gofumpt.sh",
37+
"fmt": "scripts/gofumpt.sh",
38+
"test": "go test -race -cover ./...",
39+
"test-projects-only": "DEVBOX_RUN_PROJECT_TESTS=1 go test -v -timeout ${DEVBOX_GOLANG_TEST_TIMEOUT:-30m} ./... -run \"TestExamples/development_haskell_run_test.test\"",
40+
"update-examples": "devbox run build && go run testscripts/testrunner/updater/main.go",
4141
// Updates the Flake's vendorHash: First run `go mod vendor` to vendor
4242
// the dependencies, then hash the vendor directory with Nix.
4343
// The hash is saved to the `vendor-hash` file, which is then
@@ -49,7 +49,10 @@
4949
"go mod vendor -o $vendor",
5050
"nix hash path $vendor >vendor-hash",
5151
],
52-
"tidy": ["go mod tidy", "devbox run update-hash"],
52+
"tidy": [
53+
"go mod tidy",
54+
"devbox run update-hash"
55+
],
5356
// docker-testscripts runs the testscripts with Docker to exercise
5457
// Linux-specific tests. It invokes the test binary directly, so any extra
5558
// test runner flags must have their "-test." prefix.
@@ -59,7 +62,6 @@
5962
// devbox run docker-testscripts -test.run ^TestScripts$/python
6063
"docker-testscripts": [
6164
"cd testscripts",
62-
6365
// The Dockerfile looks for a testscripts-$TARGETOS-$TARGETARCH binary
6466
// to run the tests. Pre-compiling a static test binary lets us avoid
6567
// polluting the container with a Go toolchain or shared libraries that
@@ -72,4 +74,4 @@
7274
],
7375
},
7476
},
75-
}
77+
}

examples/development/haskell/devbox.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,20 @@
99
"darwin.Security": {
1010
"version": "latest",
1111
"platforms": [
12-
"aarch64-linux"
12+
"aarch64-darwin"
1313
]
14-
}
14+
},
15+
"which": "latest"
1516
},
1617
"env": {
17-
"PATH": "/usr/bin/security:$PATH"
18+
"WORK": "$PWD"
1819
},
1920
"shell": {
2021
"init_hook": null,
2122
"scripts": {
2223
"run_test": [
24+
"ls -l /usr/bin/",
25+
"echo $PATH",
2326
"cd my-project",
2427
"stack build",
2528
"stack exec my-project-exe"

examples/development/haskell/devbox.lock

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,24 @@
4949
}
5050
}
5151
},
52+
"darwin.Security@latest": {
53+
"last_modified": "2024-11-16T04:25:12Z",
54+
"resolved": "github:NixOS/nixpkgs/34a626458d686f1b58139620a8b2793e9e123bba#darwin.Security",
55+
"source": "devbox-search",
56+
"version": "11.0",
57+
"systems": {
58+
"aarch64-linux": {
59+
"outputs": [
60+
{
61+
"name": "out",
62+
"path": "/nix/store/nvzqysba0ga8w7b93y2jsfmw6bicrk35-Security-11.0",
63+
"default": true
64+
}
65+
],
66+
"store_path": "/nix/store/nvzqysba0ga8w7b93y2jsfmw6bicrk35-Security-11.0"
67+
}
68+
}
69+
},
5270
"ghc@latest": {
5371
"last_modified": "2024-02-10T18:15:24Z",
5472
"plugin_version": "0.0.2",
@@ -290,6 +308,54 @@
290308
}
291309
}
292310
},
311+
"which@latest": {
312+
"last_modified": "2024-11-28T07:51:56Z",
313+
"resolved": "github:NixOS/nixpkgs/226216574ada4c3ecefcbbec41f39ce4655f78ef#which",
314+
"source": "devbox-search",
315+
"version": "2.21",
316+
"systems": {
317+
"aarch64-darwin": {
318+
"outputs": [
319+
{
320+
"name": "out",
321+
"path": "/nix/store/3njbfjzp8rs1gci6piwfgcjim4kz0mvh-which-2.21",
322+
"default": true
323+
}
324+
],
325+
"store_path": "/nix/store/3njbfjzp8rs1gci6piwfgcjim4kz0mvh-which-2.21"
326+
},
327+
"aarch64-linux": {
328+
"outputs": [
329+
{
330+
"name": "out",
331+
"path": "/nix/store/nmm227n8fgij8yqba78q5dgnid0gfrbv-which-2.21",
332+
"default": true
333+
}
334+
],
335+
"store_path": "/nix/store/nmm227n8fgij8yqba78q5dgnid0gfrbv-which-2.21"
336+
},
337+
"x86_64-darwin": {
338+
"outputs": [
339+
{
340+
"name": "out",
341+
"path": "/nix/store/8axi57jgpmsxbyy1lyhxz203w37m3j7y-which-2.21",
342+
"default": true
343+
}
344+
],
345+
"store_path": "/nix/store/8axi57jgpmsxbyy1lyhxz203w37m3j7y-which-2.21"
346+
},
347+
"x86_64-linux": {
348+
"outputs": [
349+
{
350+
"name": "out",
351+
"path": "/nix/store/20mggxpyrbcbs2vxdk3zr7wlgnblwk74-which-2.21",
352+
"default": true
353+
}
354+
],
355+
"store_path": "/nix/store/20mggxpyrbcbs2vxdk3zr7wlgnblwk74-which-2.21"
356+
}
357+
}
358+
},
293359
"zlib@latest": {
294360
"last_modified": "2024-02-21T16:29:05Z",
295361
"resolved": "github:NixOS/nixpkgs/ac4c5a60bebfb783f1106d126b9f39cc8e809e0e#zlib",

0 commit comments

Comments
 (0)