Skip to content

Commit 05cfe40

Browse files
committed
chore: refactor devbox configuration for improved build process
- Comment out the CARGO_HOME and PATH exports in the .envrc file - Update the build alias to include the --release flag - Add the libiconv package and lldb-vscode extension to the devbox.json dependencies - Introduce additional shell initialization commands for setting CARGO_HOME and updating the PATH in devbox.json - Modify the test command in devbox.json to run cargo test with output display Signed-off-by: Trim Bresilla <trim.bresilla@gmail.com>
1 parent 485968d commit 05cfe40

3 files changed

Lines changed: 108 additions & 83 deletions

File tree

.envrc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
eval "$(devbox generate direnv --print-envrc)"
55

66

7-
export CARGO_HOME="/env/cargo"
7+
# export CARGO_HOME="/env/cargo"
88
export ENVNAME=rust
9-
export PATH="$PWD/target/debug:$PATH"
9+
# export PATH="$PWD/target/debug:$PATH"
1010
unset GITHUB_TOKEN
1111

12-
export_alias build 'cd $(git rev-parse --show-toplevel) && cargo build'
12+
export_alias build 'cd $(git rev-parse --show-toplevel) && cargo build --release'
1313
export_alias run 'cd $(git rev-parse --show-toplevel) && cargo run -q'
1414
#export_alias run '$(git rev-parse --show-toplevel)/target/debug/$(basename $(git rev-parse --show-toplevel)) $@'
1515
#export_alias run '$(git rev-parse --show-toplevel)/target/debug/rc'

devbox.json

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,26 @@
11
{
2-
"packages": [
3-
"rustc@latest",
4-
"cargo@latest",
5-
"rust-analyzer@latest",
6-
"clippy@latest",
7-
"vscode-extensions.llvm-org.lldb-vscode@latest"
8-
],
9-
"shell": {
10-
"init_hook": [
11-
"echo 'Welcome to devbox!' > /dev/null"
2+
"packages": [
3+
"rustc@latest",
4+
"cargo@latest",
5+
"rust-analyzer@latest",
6+
"clippy@latest",
7+
"libiconv@latest",
8+
"vscode-extensions.llvm-org.lldb-vscode@latest",
129
],
13-
"scripts": {
14-
"test": [
15-
"echo \"Error: no test specified\" && exit 1"
16-
]
10+
"shell": {
11+
"init_hook": [
12+
"projectDir=$PWD",
13+
"cargoHome=\"$projectDir\"/.direnv/cargo",
14+
"mkdir -p $cargoHome",
15+
"export CARGO_HOME=$cargoHome",
16+
"export LIBRARY_PATH=$LIBRARY_PATH:\"$projectDir/.devbox/nix/profile/default/lib\"",
17+
"export PATH=$PATH:$projectDir/target/release",
18+
"cargo fetch"
19+
],
20+
"scripts": {
21+
"test": "cargo test -- --show-output",
22+
"start" : "cargo run",
23+
"build-docs": "cargo doc"
24+
}
1725
}
18-
}
1926
}

devbox.lock

Lines changed: 83 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -2,257 +2,275 @@
22
"lockfile_version": "1",
33
"packages": {
44
"cargo@latest": {
5-
"last_modified": "2024-05-22T06:18:38Z",
6-
"resolved": "github:NixOS/nixpkgs/3f316d2a50699a78afe5e77ca486ad553169061e#cargo",
5+
"last_modified": "2024-12-23T21:10:33Z",
6+
"resolved": "github:NixOS/nixpkgs/de1864217bfa9b5845f465e771e0ecb48b30e02d#cargo",
77
"source": "devbox-search",
8-
"version": "1.77.2",
8+
"version": "1.83.0",
99
"systems": {
1010
"aarch64-darwin": {
1111
"outputs": [
1212
{
1313
"name": "out",
14-
"path": "/nix/store/6dysg86604nl3cqw6wxsdawwf80cwz84-cargo-1.77.2",
14+
"path": "/nix/store/ikfdri2li81zaq727y0g1wsl903mj1fi-cargo-1.83.0",
1515
"default": true
1616
}
1717
],
18-
"store_path": "/nix/store/6dysg86604nl3cqw6wxsdawwf80cwz84-cargo-1.77.2"
18+
"store_path": "/nix/store/ikfdri2li81zaq727y0g1wsl903mj1fi-cargo-1.83.0"
1919
},
2020
"aarch64-linux": {
2121
"outputs": [
2222
{
2323
"name": "out",
24-
"path": "/nix/store/y7g0y71k01w8q91667gw7jnhkgx3zcjq-cargo-1.77.2",
24+
"path": "/nix/store/ih71bn1yzc6dj1yidzsmdan4b7w5r39k-cargo-1.83.0",
2525
"default": true
2626
}
2727
],
28-
"store_path": "/nix/store/y7g0y71k01w8q91667gw7jnhkgx3zcjq-cargo-1.77.2"
28+
"store_path": "/nix/store/ih71bn1yzc6dj1yidzsmdan4b7w5r39k-cargo-1.83.0"
2929
},
3030
"x86_64-darwin": {
3131
"outputs": [
3232
{
3333
"name": "out",
34-
"path": "/nix/store/hs62jqnwlpnip1n3wv4xy7yy0xgbpv0w-cargo-1.77.2",
34+
"path": "/nix/store/p0d8l6w4n4di0kmiic375zl0f3ig1pzs-cargo-1.83.0",
3535
"default": true
3636
}
3737
],
38-
"store_path": "/nix/store/hs62jqnwlpnip1n3wv4xy7yy0xgbpv0w-cargo-1.77.2"
38+
"store_path": "/nix/store/p0d8l6w4n4di0kmiic375zl0f3ig1pzs-cargo-1.83.0"
3939
},
4040
"x86_64-linux": {
4141
"outputs": [
4242
{
4343
"name": "out",
44-
"path": "/nix/store/z8dx4c6z528qi2w1p38yzg17g8q5jnln-cargo-1.77.2",
44+
"path": "/nix/store/q2p507l5rmfw7c4n5pr6gcd5p2gyws2c-cargo-1.83.0",
4545
"default": true
4646
}
4747
],
48-
"store_path": "/nix/store/z8dx4c6z528qi2w1p38yzg17g8q5jnln-cargo-1.77.2"
48+
"store_path": "/nix/store/q2p507l5rmfw7c4n5pr6gcd5p2gyws2c-cargo-1.83.0"
4949
}
5050
}
5151
},
5252
"clippy@latest": {
53-
"last_modified": "2024-05-22T06:18:38Z",
54-
"resolved": "github:NixOS/nixpkgs/3f316d2a50699a78afe5e77ca486ad553169061e#clippy",
53+
"last_modified": "2024-12-23T21:10:33Z",
54+
"resolved": "github:NixOS/nixpkgs/de1864217bfa9b5845f465e771e0ecb48b30e02d#clippy",
5555
"source": "devbox-search",
56-
"version": "1.77.2",
56+
"version": "1.83.0",
5757
"systems": {
5858
"aarch64-darwin": {
5959
"outputs": [
6060
{
6161
"name": "out",
62-
"path": "/nix/store/fyjfaa83p7v6dqdshvzqx8rcqrdy7pg2-clippy-1.77.2",
62+
"path": "/nix/store/rsrwbzmvkifpx0y7rz7wvy5ikfdb1nrg-clippy-1.83.0",
6363
"default": true
6464
}
6565
],
66-
"store_path": "/nix/store/fyjfaa83p7v6dqdshvzqx8rcqrdy7pg2-clippy-1.77.2"
66+
"store_path": "/nix/store/rsrwbzmvkifpx0y7rz7wvy5ikfdb1nrg-clippy-1.83.0"
6767
},
6868
"aarch64-linux": {
6969
"outputs": [
7070
{
7171
"name": "out",
72-
"path": "/nix/store/xnfg0zfzl21phsjb9222rkj8j8q0k5sk-clippy-1.77.2",
72+
"path": "/nix/store/0mkl1l8qbrbizpbhj9lhll7nmlmhyalg-clippy-1.83.0",
7373
"default": true
7474
},
7575
{
7676
"name": "debug",
77-
"path": "/nix/store/rjakvxq2p1jk51033dzyvxfbsr2i2yxj-clippy-1.77.2-debug"
77+
"path": "/nix/store/hqil1gf15lp1fkr4fppkbk54biw0cnkw-clippy-1.83.0-debug"
7878
}
7979
],
80-
"store_path": "/nix/store/xnfg0zfzl21phsjb9222rkj8j8q0k5sk-clippy-1.77.2"
80+
"store_path": "/nix/store/0mkl1l8qbrbizpbhj9lhll7nmlmhyalg-clippy-1.83.0"
8181
},
8282
"x86_64-darwin": {
8383
"outputs": [
8484
{
8585
"name": "out",
86-
"path": "/nix/store/n6vaq6a2pb8ssm90x0hyfl01dsh0j91s-clippy-1.77.2",
86+
"path": "/nix/store/x2y86kgj5wpsdf6d30wnvacr470fp2xl-clippy-1.83.0",
8787
"default": true
8888
}
8989
],
90-
"store_path": "/nix/store/n6vaq6a2pb8ssm90x0hyfl01dsh0j91s-clippy-1.77.2"
90+
"store_path": "/nix/store/x2y86kgj5wpsdf6d30wnvacr470fp2xl-clippy-1.83.0"
9191
},
9292
"x86_64-linux": {
9393
"outputs": [
9494
{
9595
"name": "out",
96-
"path": "/nix/store/52jh0wm8ygxbxqd0vnqsnsr3iz30cif8-clippy-1.77.2",
96+
"path": "/nix/store/z7z8chcf39irpraswq4pkwg0d4jyyslf-clippy-1.83.0",
9797
"default": true
9898
},
9999
{
100100
"name": "debug",
101-
"path": "/nix/store/93p43476pnig9jr4jml9zgvn4vcb4h6d-clippy-1.77.2-debug"
101+
"path": "/nix/store/16d7kldad1p3ajxz8zaiq577x9dqh7ba-clippy-1.83.0-debug"
102102
}
103103
],
104-
"store_path": "/nix/store/52jh0wm8ygxbxqd0vnqsnsr3iz30cif8-clippy-1.77.2"
104+
"store_path": "/nix/store/z7z8chcf39irpraswq4pkwg0d4jyyslf-clippy-1.83.0"
105+
}
106+
}
107+
},
108+
"libiconv@latest": {
109+
"last_modified": "2024-12-23T21:10:33Z",
110+
"resolved": "github:NixOS/nixpkgs/de1864217bfa9b5845f465e771e0ecb48b30e02d#libiconv",
111+
"source": "devbox-search",
112+
"version": "2.40",
113+
"systems": {
114+
"aarch64-linux": {
115+
"outputs": [
116+
{
117+
"name": "out",
118+
"path": "/nix/store/9sj81vq4da8pi1lk5giygcy78nji3f7c-glibc-iconv-2.40",
119+
"default": true
120+
}
121+
],
122+
"store_path": "/nix/store/9sj81vq4da8pi1lk5giygcy78nji3f7c-glibc-iconv-2.40"
123+
},
124+
"x86_64-linux": {
125+
"outputs": [
126+
{
127+
"name": "out",
128+
"path": "/nix/store/ym52wgq3kyp6c3sy27qnzd4g81i4d5v6-glibc-iconv-2.40",
129+
"default": true
130+
}
131+
],
132+
"store_path": "/nix/store/ym52wgq3kyp6c3sy27qnzd4g81i4d5v6-glibc-iconv-2.40"
105133
}
106134
}
107135
},
108136
"rust-analyzer@latest": {
109-
"last_modified": "2024-05-22T06:18:38Z",
110-
"resolved": "github:NixOS/nixpkgs/3f316d2a50699a78afe5e77ca486ad553169061e#rust-analyzer",
137+
"last_modified": "2025-01-24T01:56:22Z",
138+
"resolved": "github:NixOS/nixpkgs/4dfc61e9cd0c26b3bc3e6d6fac3ba10d18959fc4#rust-analyzer",
111139
"source": "devbox-search",
112-
"version": "2024-04-29",
140+
"version": "2025-01-20",
113141
"systems": {
114142
"aarch64-darwin": {
115143
"outputs": [
116144
{
117145
"name": "out",
118-
"path": "/nix/store/k7ghh922ryw591cyswy75adfgjwxvgd4-rust-analyzer-2024-04-29",
146+
"path": "/nix/store/vm13rngf8bgsyj5spr02yskprp4y9plv-rust-analyzer-2025-01-20",
119147
"default": true
120148
}
121149
],
122-
"store_path": "/nix/store/k7ghh922ryw591cyswy75adfgjwxvgd4-rust-analyzer-2024-04-29"
150+
"store_path": "/nix/store/vm13rngf8bgsyj5spr02yskprp4y9plv-rust-analyzer-2025-01-20"
123151
},
124152
"aarch64-linux": {
125153
"outputs": [
126154
{
127155
"name": "out",
128-
"path": "/nix/store/nj8sxv5nlhb0pr94yifkqa2ksmd8zvwl-rust-analyzer-2024-04-29",
156+
"path": "/nix/store/d91hi49k8qf99nlja223780y5jskyzds-rust-analyzer-2025-01-20",
129157
"default": true
130158
}
131159
],
132-
"store_path": "/nix/store/nj8sxv5nlhb0pr94yifkqa2ksmd8zvwl-rust-analyzer-2024-04-29"
160+
"store_path": "/nix/store/d91hi49k8qf99nlja223780y5jskyzds-rust-analyzer-2025-01-20"
133161
},
134162
"x86_64-darwin": {
135163
"outputs": [
136164
{
137165
"name": "out",
138-
"path": "/nix/store/j8zfrlqsj7rvasg0ap68cbsrb8gv17g3-rust-analyzer-2024-04-29",
166+
"path": "/nix/store/vg63mmaad8rhcbar4i4mwjqcwr9fhkxc-rust-analyzer-2025-01-20",
139167
"default": true
140168
}
141169
],
142-
"store_path": "/nix/store/j8zfrlqsj7rvasg0ap68cbsrb8gv17g3-rust-analyzer-2024-04-29"
170+
"store_path": "/nix/store/vg63mmaad8rhcbar4i4mwjqcwr9fhkxc-rust-analyzer-2025-01-20"
143171
},
144172
"x86_64-linux": {
145173
"outputs": [
146174
{
147175
"name": "out",
148-
"path": "/nix/store/cqwfx5lw6xq4rmam8fc49fn5vcnfxrzy-rust-analyzer-2024-04-29",
176+
"path": "/nix/store/6mkyvjjvsp4ymakvbqvqb3vpdqrffzyf-rust-analyzer-2025-01-20",
149177
"default": true
150178
}
151179
],
152-
"store_path": "/nix/store/cqwfx5lw6xq4rmam8fc49fn5vcnfxrzy-rust-analyzer-2024-04-29"
180+
"store_path": "/nix/store/6mkyvjjvsp4ymakvbqvqb3vpdqrffzyf-rust-analyzer-2025-01-20"
153181
}
154182
}
155183
},
156184
"rustc@latest": {
157-
"last_modified": "2024-05-22T06:18:38Z",
185+
"last_modified": "2024-12-23T21:10:33Z",
158186
"plugin_version": "0.0.1",
159-
"resolved": "github:NixOS/nixpkgs/3f316d2a50699a78afe5e77ca486ad553169061e#rustc",
187+
"resolved": "github:NixOS/nixpkgs/de1864217bfa9b5845f465e771e0ecb48b30e02d#rustc",
160188
"source": "devbox-search",
161-
"version": "1.77.2",
189+
"version": "1.83.0",
162190
"systems": {
163191
"aarch64-darwin": {
164192
"outputs": [
165193
{
166194
"name": "out",
167-
"path": "/nix/store/vz0f0ydykljjji91a94sq8jskh3lpl4h-rustc-wrapper-1.77.2",
195+
"path": "/nix/store/p5amipv0pskx02kwj5ypz3zqk4dbsmsc-rustc-wrapper-1.83.0",
168196
"default": true
169197
},
170198
{
171199
"name": "man",
172-
"path": "/nix/store/0r6hm57fmlzhngn76v7vh7vzfp7qrsq8-rustc-wrapper-1.77.2-man",
200+
"path": "/nix/store/29b0vj58rirb7dnp0kmx95s4625khf2k-rustc-wrapper-1.83.0-man",
173201
"default": true
174202
},
175203
{
176204
"name": "doc",
177-
"path": "/nix/store/27mzrpxnjkxxrcgs421m47digv5izwj9-rustc-wrapper-1.77.2-doc"
205+
"path": "/nix/store/jf8xzbc0siy8zhn9fc2x975zhpxywzci-rustc-wrapper-1.83.0-doc"
178206
}
179207
],
180-
"store_path": "/nix/store/vz0f0ydykljjji91a94sq8jskh3lpl4h-rustc-wrapper-1.77.2"
208+
"store_path": "/nix/store/p5amipv0pskx02kwj5ypz3zqk4dbsmsc-rustc-wrapper-1.83.0"
181209
},
182210
"aarch64-linux": {
183211
"outputs": [
184212
{
185213
"name": "out",
186-
"path": "/nix/store/k39d1qjy8bz9l3q9jggwwppj090zs502-rustc-wrapper-1.77.2",
214+
"path": "/nix/store/ljxqb5zg6hln3bjpv4kdrgdgqaadrk4r-rustc-wrapper-1.83.0",
187215
"default": true
188216
},
189217
{
190218
"name": "man",
191-
"path": "/nix/store/81z8isp5ycxfnw605hyjimyr1z6y4frs-rustc-wrapper-1.77.2-man",
219+
"path": "/nix/store/i2a8fxc2g27l8z0nn2c7njzm6d4pnj0d-rustc-wrapper-1.83.0-man",
192220
"default": true
193221
},
194222
{
195223
"name": "doc",
196-
"path": "/nix/store/ffllkq9ghxj8jb5vrrgq812kg1rv0p7r-rustc-wrapper-1.77.2-doc"
224+
"path": "/nix/store/k5j54ripmz15b3fdp3dzkbmiyki56dz2-rustc-wrapper-1.83.0-doc"
197225
}
198226
],
199-
"store_path": "/nix/store/k39d1qjy8bz9l3q9jggwwppj090zs502-rustc-wrapper-1.77.2"
227+
"store_path": "/nix/store/ljxqb5zg6hln3bjpv4kdrgdgqaadrk4r-rustc-wrapper-1.83.0"
200228
},
201229
"x86_64-darwin": {
202230
"outputs": [
203231
{
204232
"name": "out",
205-
"path": "/nix/store/44m5mf334ids5kx3ky29s32hmbk9bddp-rustc-wrapper-1.77.2",
233+
"path": "/nix/store/yxirviqw5bibspwnprih4qfrgj64mnpb-rustc-wrapper-1.83.0",
206234
"default": true
207235
},
208236
{
209237
"name": "man",
210-
"path": "/nix/store/wpb35n9fbi4fb7z2klz6b975a1870vw1-rustc-wrapper-1.77.2-man",
238+
"path": "/nix/store/v95srxw4lm2h2mm20nxga6a81s6cqrdg-rustc-wrapper-1.83.0-man",
211239
"default": true
212240
},
213241
{
214242
"name": "doc",
215-
"path": "/nix/store/h40ph4ylmv4xbkp05ibgjfiq4vxxx8kp-rustc-wrapper-1.77.2-doc"
243+
"path": "/nix/store/slmk6v5a7n5m29ix55p2zs578asz0zlw-rustc-wrapper-1.83.0-doc"
216244
}
217245
],
218-
"store_path": "/nix/store/44m5mf334ids5kx3ky29s32hmbk9bddp-rustc-wrapper-1.77.2"
246+
"store_path": "/nix/store/yxirviqw5bibspwnprih4qfrgj64mnpb-rustc-wrapper-1.83.0"
219247
},
220248
"x86_64-linux": {
221249
"outputs": [
222250
{
223251
"name": "out",
224-
"path": "/nix/store/j2zdy07sb5nbiskhp5g79c93rj9076n0-rustc-wrapper-1.77.2",
252+
"path": "/nix/store/ss0yarz4m14gcskw73makm0glkm5aj9a-rustc-wrapper-1.83.0",
225253
"default": true
226254
},
227255
{
228256
"name": "man",
229-
"path": "/nix/store/hwnpy2pmiq5m3xvckcwxvparxgwal323-rustc-wrapper-1.77.2-man",
257+
"path": "/nix/store/s60fdzdiib5radv5r1qwa7knh0sqkcz1-rustc-wrapper-1.83.0-man",
230258
"default": true
231259
},
232260
{
233261
"name": "doc",
234-
"path": "/nix/store/xdqq9v95ydwp4cc44qrdfvfsk1ll15mx-rustc-wrapper-1.77.2-doc"
262+
"path": "/nix/store/kca9190b63mm2frbfmkjxc7wpms94bnj-rustc-wrapper-1.83.0-doc"
235263
}
236264
],
237-
"store_path": "/nix/store/j2zdy07sb5nbiskhp5g79c93rj9076n0-rustc-wrapper-1.77.2"
265+
"store_path": "/nix/store/ss0yarz4m14gcskw73makm0glkm5aj9a-rustc-wrapper-1.83.0"
238266
}
239267
}
240268
},
241269
"vscode-extensions.llvm-org.lldb-vscode@latest": {
242270
"last_modified": "2023-02-24T09:01:09Z",
243271
"resolved": "github:NixOS/nixpkgs/7d0ed7f2e5aea07ab22ccb338d27fbe347ed2f11#vscode-extensions.llvm-org.lldb-vscode",
244272
"source": "devbox-search",
245-
"version": "8.0.1",
246-
"systems": {
247-
"x86_64-linux": {
248-
"outputs": [
249-
{
250-
"path": "/nix/store/26dsjp1rgxbb01xfar2p5paann0555f7-lldb-8.0.1",
251-
"default": true
252-
}
253-
]
254-
}
255-
}
273+
"version": "8.0.1"
256274
}
257275
}
258276
}

0 commit comments

Comments
 (0)