Releases: jetify-com/devbox
0.1.1 - Run Scripts, pin Nixpkg SHA
Release 0.1.1 includes two major new features: package pinning and executing scripts with devbox run
New Features
Pin Nixpkgs in your Devbox.json
You can now pin an exact version of the Nixpkg repository for installing packages. This feature is useful for pinning the versions of the packages installed by Devbox, or for selecting packages from older revisions of Nixpkg.
To pin the Nixpkg version, add the commit of the Nixpkg repo that you want to use in your devbox.json
.
"nixpkgs": {
"commit": "89f196fe781c53cb50fef61d3063fa5e8d61b6e5"
}
If you leave the commit unset, Devbox will automatically add a default Nixpkg commit to your devbox.json
when you run a command that reads your devbox.json
like devbox add
. You can update your project to the latest default by deleting the commit hash from your devbox.json
.
For more details, see the Nixpkg pinning guide on our docs page.
Running Scripts in Devbox Shell
Developers can now define scripts in their devbox.json
, and execute them in their Devbox Shell using devbox run
. Scripts are defined by providing a name, and a command or list of commands for Devbox to run.
"shell": {
"init_hook": [
"source conf/set-environmen.sh",
"rustup default stable",
"cargo fetch"
],
"scripts": {
"test": "cargo test -- --show-output",
"start" : "cargo run",
}
}
You can then execute your scripts using devbox run <script_name>
. Devbox will then start an interactive shell, run your init_hook
, run the script, and then exit when the script completes or is interrupted by CTRL-C. For example:
$ devbox run start
Installing nix packages. This may take a while... done.
Starting a devbox shell...
project dir is /Users/johnlago/src/devbox-examples/development/rust/rust-stable-hello-world/conf
info: using existing install for 'stable-aarch64-apple-darwin'
info: default toolchain set to 'stable-aarch64-apple-darwin'
stable-aarch64-apple-darwin unchanged - rustc 1.64.0 (a55dd71d5 2022-09-19)
Finished dev [unoptimized + debuginfo] target(s) in 0.00s
Running `target/debug/rust-stable-hello-world`
Hello, world!
$
For more information and tips on how to use Devbox scripts, see the scripts guide in our docs page.
Bug Fixes
- Fixed a bug where not all zsh startup files were included in a developer's shellrc (#250)
- Fixed a PkgExists panic for some missing packages (#249)
What's Changed
- nix: fix PkgExists panic for some missing packages by @gcurtis in #249
- [feature-flag] Add simple feature flag package by @mikeland86 in #251
- [devbox shell] ensure all zsh startup files are linked to ZDOTDIR by @savil in #250
- [nipkgs version] add feature flag and write to devbox.json if missing by @savil in #252
- [pkgcfg] Create new pkgckg that can load local config by @mikeland86 in #253
- [nixpkgs version] change field from version to commit; add validation by @savil in #256
- [nixpkgs version] generate nix files containing the nixpkgs version from config by @savil in #258
- [nixpkgs version] devbox init should add default nixpkgs commit by @savil in #259
- [pkg-config] Add bin sym links and add to path by @mikeland86 in #257
- [feature flag] respect env-var of feature flag (even if turned off) and default enable Nixpkg Version FF by @savil in #266
- [pkg-config] Implement basic mariadb config by @mikeland86 in #263
- [pkg-config] Read config from github by @mikeland86 in #264
- Use
for logo light/dark mode by @gcurtis in #260 - ci: suffix Jetpack preview namespaces with "-ref" by @gcurtis in #271
- First pass at devbox scripts implementation by @ipince in #254
- devbox: add PackageStore and Package for querying /nix/store by @gcurtis in #270
- Docs for Devbox Run and Setting the Commit Sha by @Lagoja in #268
- vscode extension settings + devcontainer setup + devbox commands by @mohsenari in #262
- Unhide devbox run by @ipince in #275
Full Changelog: 0.1.0...0.1.1
0.1.1-dev
0.1.1-dev
0.1.0
Release 0.1.0 features some workflow improvements to make devbox shell
more reliable, and includes the v1 release of our Visual Studio Code extension.
⚠️ Note: This release may cause some projects to break if they do not explicitly declare their packages in the devbox.json. See Shell Package Suggestions below for more details. You can fix your project by adding the suggested packages withdevbox add [packages]
Workflow Improvements
-
Shell Package Suggestions: Devbox will no longer automatically add packages when you run
devbox shell
. Instead Devbox will suggest packages that may be missing from your shell and prompt you to add them. This feature was changed due to reports of conflicts between user installed packages and auto installed packages.- For example, if I try to start a shell in my Python project without adding the
python3
package:
➜ devbox shell Installing nix packages. This may take a while...done. We detected extra packages you may need. To install them, run `devbox add python3` Starting a devbox shell...
I can then add the missing packages by running the suggestion:
➜ devbox add python3 Installing nix packages. This may take a while...done. python3 is now installed. Run `hash -r` to ensure your shell is updated. `
- For example, if I try to start a shell in my Python project without adding the
- VSCode Extension: You can now automatically activate your Devbox Shells in VSCode’s integrated terminal by installing the Devbox VSCode extension. More features will be added in upcoming releases
--config
flag: You can choose a specificdevbox.json
to use withdevbox shell
using this flag. This can be useful for situations where yourdevbox.json
is in a different folder, or when you want to have multipledevbox.json
files for a single project- Devbox now warns you when you are attempting to remove a non-existent package from your devbox.json
Changelog
- adda549 Readme logo update (#243)
- 307f61e VSCode extension logo update (#242)
- 48779d1 Updated vscode extension publisher and author (#237)
- 00ed2eb VSCode extension for devbox (#236)
What's Changed
- Make IDE docs visible via sidebar.js by @Lagoja in #232
- [shell] warn when removing non-existent package by @savil in #230
- [CLI] add --config flag by @savil in #225
- [planners] Separate shell plan from build plan by @LucilleH in #227
- [Rust Shell] change to use rustup nix package to avoid overlay by @savil in #235
- VSCode extension for devbox by @mohsenari in #236
- Updated vscode extension publisher and author by @mohsenari in #237
- VSCode extension logo update by @mohsenari in #242
- Readme logo update by @mohsenari in #243
Full Changelog: 0.0.11...0.1.0
0.0.11
0.0.10
Bug Fixes
- Polish improvements for how packages are installed via nix (#215, #210, #220, #221)
- Fixed a bug that would cause builds to fail for NodeJS Planner (#212)
- Fixed a bug where Python packages installed as Nix packages could not be found in
PYTHONPATH
(#218)
Changelog
- [Bug] Fix bash regression for PATH by @LucilleH in #207
- [nodejs planner] InputFiles should take paths relative to devbox.json, and not combined with srcDir by @savil in #212
- [Fix] Ensure python sys path contains nix installed modules by @mikeland86 in #218
- [RFC] move gitignore file to .devbox directory and ignore gen/profile/shell_history by @savil in #215
- [shell] move nix-profile into a specific directory inside .devbox directory by @savil in #210
- fix pipenv test by @savil in #219
- nix: fix removing user Nix profiles from PATH by @gcurtis in #220
- devbox: handle paths with spaces by @gcurtis in #221
Full Changelog: 0.0.9...0.0.10
0.0.9
0.0.8
Release Notes
Version 0.0.8
is focused on fixing user bugs and other workflow issues.
New Language Support
- Ruby, including Ruby on Rails
- Java w/ Gradle
Workflow Improvements
- You can now add packages to a running shell without restarting
devbox shell
. You will need to runhash -r
to make the packages available in your shell after adding them. (#188) - Devbox will now look for a
devbox.json
file in parent directories, if you do not have one in your current directory. This is useful when you have multiple projects that share a singledevbox.json
file (#200) - Shell history is now preserved across
devbox shell
sessions (#204) - We now provide better error messages when we can't detect a planner during
devbox build
(#184)
Bug Fixes
- We no longer propagate an error message when a user explicitly exits their shell (#201)
- Our Golang planner no longer returns an error when
main.go
is not found (#199) - Segment errors are now silenced on connection failure (#197)
Updates to Docs, including:
- Documentation on our new planners
- How to configure your editor with Devbox
- Updated CLI reference, with flags and subcommands
Full Changelog
- [polish] improve error message for missing devbox-json by @savil in #174
- [Java Planner] part4 - Added support for gradle by @mohsenari in #160
- [Docs] Haskell and Zig Planners by @savil in #180
- Added gradle support to docs by @mohsenari in #182
- Support Rails in Ruby planner by @ipince in #183
- [build] Better error message when can't find planner by @mikeland86 in #184
- Update Python Docs by @Lagoja in #187
- Add auto generated docs to Devbox Docs by @Lagoja in #189
- Silence any segment errors by @loreto in #197
- docs: fix typo in Python language detection docs by @ipince in #195
- Add docs for Ruby by @ipince in #194
- [planner] Golang planner return error when main.go is not found by @LucilleH in #199
- [Bug] Do not propagate error on explicit shell exit by @LucilleH in #201
- Fix typo by @reflektoin in #205
- [config] look for the devbox.json file in parent directories as well by @savil in #200
- IDE integration instructions by @mohsenari in #190
- [shell] add packages within shell, leveraging nix-profile by @savil in #188
- boxcli: skip shell tests due to timeout by @gcurtis in #208
- [shell] preserve history by @savil in #204
New Contributors
- @reflektoin made their first contribution in #205
Full Changelog: 0.0.7...0.0.8
0.0.7
What's Changed
- [Bug fix] Pick one plan if no plans are buildable by @LucilleH in #136
- [planner] Add typescript support to nodejs build by @LucilleH in #153
- [docs] Move docs pages to this repo by @LucilleH in #165
- [HaskellPlanner] enable shell and build for Stack framework by @savil in #155
- Add docs markdown linter and readme by @LucilleH in #166
- Ruby planner (without Rails) by @ipince in #164
- devbox shell -- cmd by @loreto in #158
- [bug] Fix devbox exec by @LucilleH in #169
- [plan] do not html-escape json encoding by @savil in #170
- [pip] Add pip support (via venv) DEV-1146 by @mikeland86 in #147
- [devbox shell] fix parsing of cmd and path by @savil in #173
- nix: fix shellrc PATH word splitting in bash by @gcurtis in #176
- ci: debug workflow, rate limit fixes, cleanup by @gcurtis in #168
- [plan] Plan.Definitions add omitempty by @savil in #171
- nix: carry over (NIX_)SSL_CERT_FILE to devbox shells by @gcurtis in #178
- devbox: add AppendScript method to ConfigShellCmds by @gcurtis in #149
New Contributors
Full Changelog: 0.0.6...0.0.7
0.0.6
Release Notes
Version 0.0.6
is focused on supporting additional languages and improving some of the existing ones, including:
- C#
- Rust
- Java
- Zig
Additionally:
- Image name and tag can now be set when running devbox build
- Fixed a bug where the custom paths in a user’s shellrc were not being passed to devbox shell
What's Changed
- Separate devbox config struct from planner struct by @LucilleH in #122
- nix: allow user's shellrc to update PATH; add tests for shellrc template by @gcurtis in #106
- [CSharp Planner] part 1: devbox shell by @savil in #120
- [Rust Planner] part 1: devbox shell by @savil in #97
- [php planner] sort extensions for test stability by @savil in #129
- [Rust Planner] part 2: devbox build by @savil in #104
- [java planner] part1: shell packages for OpenJDK + Maven by @mohsenari in #125
- devbox: allow shell.init_hook to be a JSON array by @gcurtis in #131
- [RFC][Rust Planner] Reduce image size by using glibc, and copying built binary by @savil in #132
- [CSharpPlanner] implement build functionality, albeit bloated by @savil in #134
- [DotNetPlanner] shell and build for C# and F# by @savil in #135
- [bug] Change BUILDKIT to DOCKER_BUILDKIT by @LucilleH in #140
- Change nix-shell requirements to only add and shell command by @LucilleH in #143
- Allow setting name and tag in devbox build by @LucilleH in #144
- [Java Planner] part2: Added install + build steps to planner by @mohsenari in #138
- nix: load env before Nix shellHook; clean up PATH by @gcurtis in #124
- [nginx]Add nginx static file planner DEV-1147 by @mikeland86 in #105
- remove erroneous printf by @savil in #148
- [Java planner] part3 reducing docker image size by @mohsenari in #146
- [DotNetPlanner] add installing packages to InstallStage by @savil in #142
- [RustPlanner] use InstallStage by @savil in #151
- boxcli: increase shell test timeout to 3 mins by @gcurtis in #152
- ci: add debug workflow by @gcurtis in #154
- [ZigPlanner] Add support for shell and build by @savil in #141
- Change pre-releases to happen weekly on Thursdays by @loreto in #157
Full Changelog: 0.0.5...0.0.6
0.0.5
Release Notes
Shell and Build Support for NodeJS and PHP
Devbox can now autodetect NodeJs and PHP projects. You can use devbox shell
to spin up a shell with Node + PHP included, or build a Docker container with devbox build
.
Customize your Devbox Shell with Init Hooks
Scripts configured as init_hooks in your devbox.json will run whenever you start a Devbox shell. This can be used to set environment variables, run setup tasks, or start background services whenever you initialize your shell. For example, you can use an init hook to customize your prompt whenever you start a shell:
{
"shell": {
"init_hook": "export PS1='📦 devbox> '\necho 'Welcome! See CONTRIBUTING.md for tips on contributing to devbox.'"
}
}
Packages are now included in your Docker containers
Nix packages added in your devbox.json are now also installed in your Docker container when running devbox build
. Packages will be installed before your project’s installation_stage
runs.
You can view the full set of commits for this pre-release on Github
What's Next for Devbox
Our upcoming development cycle will focus on further expanding our language support, as well as releasing a framework for developers in our community to easily add Devbox support for their favorite languages. You can learn more about what's coming by reviewing our Public Roadmap.
Upgrading to the newest release
If you installed devbox via our install script (curl -fsSL https://get.jetpack.io/devbox | bash
), you should get the new version automatically. The next time you run devbox you should see:
✓ Downloading version 0.0.5... [DONE]
✓ Verifying checksum... [DONE]
✓ Unpacking binary... [DONE]
Changelog
- Fix README status badge by @gcurtis in #69
- Add links to devbox site & docs in readme by @robrich in #71
- Support runtime packages by @loreto in #52
- Generate runtime.nix by @loreto in #75
- Fix spurious segment error by @Lagoja in #61
- Add testdata/ by @loreto in #77
- [CLI] Improve errors, add user errors, plan errors by @mikeland86 in #62
- Chinese Translation by @Yeegsing in #66
- [CLI] Add IsBuildable to allow projects to be shell only by @mikeland86 in #64
- [PHP] Add PHP shell support by @mikeland86 in #65
- Packages should be unique in plan by @LucilleH in #79
- [planners] First pass on node js planner by @LucilleH in #41
- Add test that iterates through testdata/ by @loreto in #82
- Improve devbox plan test for go and python by @loreto in #85
- [python] Improve python poetry planner to auto-detect main module by @mikeland86 in #84
- [PHP] Add basic php build support by @mikeland86 in #86
- Add Node planner test and additional checks for planner fields by @LucilleH in #87
- [PHP] update readme by @mikeland86 in #88
- Add dummy planners for a bunch of languages by @loreto in #98
- [cuecfg] add toml support by @savil in #92
- Run generate as part of TestDevbox by @loreto in #101
- boxcli: add basic tests for devbox shell by @gcurtis in #83
- Added contributing guidelines file plus reference in readme by @mohsenari in #90
- nix: allow users to set shell startup hooks by @gcurtis in #93
- [planner] Optimize nodejs final image size by @LucilleH in #89
- Add Analyzer framework by @loreto in #99
- [Bug] Fix nodejs npm build step by @LucilleH in #112
- [easy] make yaml, json, toml specific functions be private in cuecfg by @savil in #115
- Change the merging logic of devbox.json and planners by @LucilleH in #103
- bump the dockerfile base image to nixos/nix:2.11.0 by @savil in #114
- [CICD] Run tests in parallel, ensure we run all tests by @mikeland86 in #121
- Tweaks to release process by @loreto in #123
- [PHP] Add extension support and better version detection by @mikeland86 in #113
New Contributors
- @Yeegsing made their first contribution in #66
- @savil made their first contribution in #92
- @mohsenari made their first contribution in #90
Full Changelog: 0.0.4...0.0.5