You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[remove nixpkgs] add toPath, and edit devbox.lock only on update command (#1256)
## Summary
This PR rolls in a few fixes:
1. Add `toPath` to `builtins.fetchClosure`
- lets us remove `--impure` flag in `nix print-dev-env`
2. Add `ca_store_path` to `devbox.lock`
- Because this is system-dependent, _and_ is calculated locally, a
`devbox update` will only update the user's system's `ca_store_path`.
- This is good for team-mates on the same system, and to avoid the slow
`nix store make-content-addressed <path>` call on each `devbox
shell/run/shellenv`.
3. Only update `devbox.lock` during `devbox update`.
- Previously, it would update system info on `devbox
shell/run/shellenv`.
4. Simplify `devbox.lock` schema's `SystemInfo` to have `StorePath` and
`CAStorePath`. These are used as `fromPath` and `toPath` in
`builtins.fetchClosure`.
Miscellaneous changes:
1. I remove `actionlint` from the `devbox.json`. It is not core to our
workflows, and I am working with very minimal space on devbox cloud VM.
This reduces "out of space errors" marginally.
## How was it tested?
In `examples/development/go/hello-world`:
`devbox update` and `devbox shell`
The `devbox.lock` diff is now
```
❯ git diff
diff --git a/examples/development/go/hello-world/devbox.lock b/examples/development/go/hello-world/
devbox.lock
index 34556d3..168874db 100644
--- a/examples/development/go/hello-world/devbox.lock
+++ b/examples/development/go/hello-world/devbox.lock
@@ -2,9 +2,18 @@
"lockfile_version": "1",
"packages": {
"[email protected]": {
- "last_modified": "2023-05-01T16:53:22Z",
- "resolved": "github:NixOS/nixpkgs/8670e496ffd093b60e74e7fa53526aa5920d09eb#go_1_19",
- "version": "1.19.8"
+ "last_modified": "2023-05-03T02:55:54Z",
+ "resolved": "github:NixOS/nixpkgs/0d373d5af960504dd60c3d06c65e553b36ef29d8#go_1_19",
+ "version": "1.19.8",
+ "systems": {
+ "aarch64-darwin": {
+ "store_path": "/nix/store/7m99ip3616l3z670y83p34r3plwd4iq1-go-1.19.8"
+ },
+ "x86_64-linux": {
+ "store_path": "/nix/store/r0x0agq0vwn0p6z99vkkvn8l8a8idzsb-go-1.19.8",
+ "ca_store_path": "/nix/store/ns557l24yf1f16f9jvbmxv57qdkkn2mj-go-1.19.8"
+ }
+ }
}
}
-}
\ No newline at end of file
+}
```
0 commit comments