github jetify-com/devbox 0.5.0
0.5.0: Find and Install Nix Packages by Version

latest releases: 0.13.6, 0.13.5, 0.13.4...
18 months ago

What's New in This Release

This release includes one of our most requested features: installing a specific package version with Devbox. A complete list of features and commits is available below.

To install 0.5.0, run devbox version update from the command line, or follow the installation steps on our docs page. You can also check out our blog post for more details

Install Packages by Version Number

Previously, developers could only install the latest version of a Nix package available in Nixpkgs, or they had to look up and pin an alternative commit in their devbox.json. With 0.5.0, we maintain an index that maps version strings to Nixpkg commits, so users can install their packages by providing a name and version.

This change is backwards compatible, meaning you do not have to update your existing devbox.json immediately when you move to 0.5.0. More details are available in our Docs

Search for Packages

You can see what versions of a package are available to install by running devbox search <package>

$ devbox search nodejs

Found 168+ results for "nodejs":

* nodejs (19.8.1, 19.7.0, 19.5.0, 19.2.0, 18.16.0, 18.15.0, 18.14.2, 18.13.0, 18.12.1, 18.10.0, 
18.8.0, 18.4.0, 18.0.0, 17.9.0, 17.5.0, 17.3.0, 17.0.1, 16.19.1, 16.19.0, 16.18.1, 16.17.1, 16.17.0, 
16.15.0, 16.14.0, 16.13.1, 16.13.0, 16.8.0, 16.4.0, 16.0.0, 15.14.0, 15.10.0, 15.5.0, 15.0.1, 
14.18.1, 14.18.0, 14.17.5, 14.17.1, 14.16.1, 14.16.0, 14.15.3, 14.15.0, 14.9.0, 14.4.0, 13.14.0, 
12.22.12, 12.22.10, 12.22.8, 12.22.7, 12.22.5, 12.22.1, 12.21.0, 12.20.0, 12.19.0, 12.18.3, 
12.18.1, 10.24.1, 10.24.0, 10.23.0, 10.22.0, 10.21.0)
* nodejs_16 (16.20.0)
* nodejs_18 (18.16.0)
* nodejs_19 (19.9.0)
* nodejs_20 (20.0.0)
...

Adding a Package to Your Project

You can add a specific version of a package to your project by running devbox add <package>@<version>. For example, to add NodeJS 16.15.0 to your project you can run:

devbox add nodejs@16.15.0

For packages that follow semver, you can also specify a minor or major version that you want to pin. For example, to install the latest version of NodeJS 16, you can run:

devbox add nodejs@16

To install the latest available version of NodeJS, you can run

devbox add nodejs@latest

or add nodejs@latest to the packages in your devbox.json.

If you do not include a version, Devbox will install the latest version of the package available in the nixpkgs.commit set in your devbox.json file.

Installing and Locking your Packages

Devbox will install your packages and generate a devbox.lock file whenever you run devbox add, devbox install, or whenever activate your shell.

{
      "nodejs@16.15.0": {
          "last_modified": "2022-06-30T00:42:12Z",
          "resolved": "github:NixOS/nixpkgs/d3248619647234b5dc74a6921bcdf6dd8323eb22#nodejs-16_x",
          "version": "16.15.0"
       }
}

You can check this lockfile in to ensure that every developer who uses your project gets the same packages

Updating your Packages

You can update your devbox.lock and packages by running devbox update. This will fetch the latest versions of your packages that are compatible with your devbox.json

Other features and fixes

  • You can now explicitly activate plugins by adding the to the include section of your devbox.json. This is helpful for when you are installing a package from a flake, but also want to activate a devbox plugin. See more in our documentation
  • We’ve simplified our direnv function to a minimal 2 line script.
  • The Dockerfile generated by devbox generate dockerfile|devcontainer is now based on Debian instead of Alpine.
  • Fixed a bug where $SHELL was not being passed to binaries in your devbox shell (contributed by @ragingpastry)
  • Improved process spawning for devbox wrapper scripts (contributed by @literatesnow)
  • Added an install command and optional --init-hooks flag for devbox global

Special Thanks to:

Full Changelist

  • Devbox Services 2.0 docs by @Lagoja in #886
  • Flake Docs by @Lagoja in #909
  • [direnv] update envrcs in projects by @savil in #915
  • Update Flakes.md Typos by @Lagoja in #918
  • Reduce cognitive complexity by @hezhizhen in #911
  • Example for linking a custom extension to PHP by @Lagoja in #919
  • [direnv] change default hooks for shell --print-env by @mohsenari in #928
  • bring back shell.nix by @savil in #927
  • [search] Add search command by @mikeland86 in #916
  • [cleanup] Simplify code by removing printDevEnv cache and version file by @mikeland86 in #921
  • [add] Implemented devbox add granular package selection by @mikeland86 in #923
  • impl: semicolon at the end of env string commands by @gcurtis in #929
  • chore: move ssh-config generation out of general generating process and wrap its error by @hezhizhen in #922
  • Update add method of devbox interface by @hezhizhen in #924
  • [devbox global] Added init hook flag to global shellenv by @mohsenari in #920
  • [cleanup] add VirtenvBinPath variable by @hezhizhen in #932
  • chore: correct package comment and tweak OSExpandEnvMap by @hezhizhen in #937
  • [devbox global] Added devbox global install command by @mohsenari in #935
  • [cleanup] replace checks for file existing with fileutil.Exists by @hezhizhen in #944
  • [cleanup] replace literal http methods with constants by @hezhizhen in #942
  • Replace current process instead of spawning a new one. by @literatesnow in #934
  • chore: move all env to one package by @hezhizhen in #941
  • [vscode extension] ensure directory exists for ssh keys by @savil in #945
  • [cleanup] update checks for exist errors and not exist errors by @hezhizhen in #943
  • chore: move all env utils to env package by @hezhizhen in #946
  • [vscode extension] bump version and add to CHANGELOG by @savil in #951
  • update README for publishing vscode-extension by @savil in #953
  • [cleanup] replace pkgslice with lo by @hezhizhen in #948
  • [tests] global-add should not fail if global-bins-not-in-path and add testscript unit tests for add and global-add by @savil in #958
  • [cleanup] remove unused functions by @hezhizhen in #947
  • [global] Don't add global packages to local by @mikeland86 in #952
  • fix: inherit SHELL env variables in wrappers by @ragingpastry in #950
  • [lockfile] Add lockfile and use search endpoint to resolve versions by @mikeland86 in #936
  • [easy][wrappers] Ensure wrappers use correct project dir by @mikeland86 in #960
  • [easy][global] Don't show eval message if already shellenved by @mikeland86 in #961
  • Update CONTRIBUTING.md with fixes and style guide by @gcurtis in #963
  • chore: update or add copyright text by @hezhizhen in #968
  • [release] also release to stable-channel's S3 bucket by @savil in #969
  • chore: update env constants and functions by @hezhizhen in #954
  • chore: rename package env as envir by @hezhizhen in #962
  • [version] part 1: update command for devbox and launcher updates by @savil in #965
  • [version update] use LAUNCHER_PATH in triggerUpdate function by @savil in #975
  • [lockfile] Use lockfile for legacy packages by @mikeland86 in #964
  • feat: add cmdutil package to provide utils for commands by @hezhizhen in #970
  • doc: Fix typo in zig.md by @saimen in #977
  • Bump sqlparse from 0.4.3 to 0.4.4 in /examples/stacks/django by @dependabot in #940
  • [update] Implement devbox update by @mikeland86 in #978
  • chore: use constants defined in envir in version check by @hezhizhen in #976
  • chore: add GetValueOrDefault for environment variables by @hezhizhen in #984
  • [lockfile] Enable feature flag by @mikeland86 in #983
  • [direnv] .envrc simplified by @mohsenari in #974
  • cli-post-release.yml: freeze latest channel by @savil in #988
  • [easy][bugs] Fix 2 package input bugs by @mikeland86 in #991
  • [update] Silence update notice for devbox-global-shellenv and development-devbox by @savil in #982
  • Update Dockerfile to match Devbox Cloud by @Lagoja in #973
  • [easy][examples] Fix vulnerability by @mikeland86 in #980
  • [CICD] Fix pre-release job and create new edge release process. by @mikeland86 in #985
  • Bump django from 4.1.7 to 4.1.9 in /examples/stacks/django by @dependabot in #992
  • [examples] Added basic tensorflow example by @mohsenari in #989
  • [services] Fix services when using versioned packages by @mikeland86 in #994
  • [versioned] Deal with packages that don't build on system by @mikeland86 in #996
  • [info] Ensure devbox info works with versioned packages by @mikeland86 in #997
  • [versioned] Add @latest to unversioned packages by @mikeland86 in #998
  • [devbox.json] Allowing including plugins explicitly via "include" field. by @mikeland86 in #986

Full Changelog: 0.4.7...0.5.0

Don't miss a new devbox release

NewReleases is sending notifications on new releases.