github jetify-com/devbox 0.6.0
0.6.0 - Faster Package Installs and Updates

latest releases: 0.13.0-devrc, 0.13.0, 0.13.0-deva...
11 months ago

New in this Release

Devbox 0.6 speeds up Nix package installs and updates for all local and global Devbox projects. Users should see an improvement of 30 seconds or more when adding a new package and more significant gains when updating or installing projects with many packages.

To upgrade to Devbox 0.6 from an earlier version of devbox, run devbox version update. You can install Devbox using the Devbox Installer or the Nix Package Manager.

Read on to learn more about Devbox 0.6. See Notes below for important details on upgrading to Devbox 0.6

How it works

Installing a package with Nix requires Nix to download and evaluate a snapshot of the Nixpkgs registry. For Devbox users, this has generally appeared as follows:

$ devbox install
Ensuring packages are installed.
Ensuring nixpkgs registry is downloaded.
[33.2 MiB DL]
< long delay while nixpkgs evaluates the registry >

This download and evaluation step took several seconds for Nix to complete. If a package in the same project relied on a different snapshot, Nix would repeat this download and evaluation loop. Devbox would hang for a long time while waiting for Nix to return from this process.

Devbox 0.6 leverages a new feature in Nix 2.17 to skip this evaluation step for packages in the Nix cache. When adding or updating packages with Devbox 0.6, the Devbox Search API will provide the correct nix-store-paths for binaries in the Nix cache and add them to the devbox.lock file. Devbox can then read the store paths and generate a Nix Flake to install them directly using builtins.fetchClosure. Since we download the packages directly, Nix no longer needs to evaluate the nixpkgs registry at install time.

Notes

  • Faster Package Installs require Nix ≥ 2.17. If you have an older version of Nix installed, Devbox will revert to the original behavior for installing packages
    • You can check your Nix version by running Nix --version.
    • To upgrade to a newer version of Nix, see the Nix Manual here.
  • Devbox will default to the old behavior of evaluating a nixpkgs snapshot for packages not in Nix's binary cache.

Bug Fixes

  • Fixed a bug where the SHELL environment was not set correctly
  • Fixed a bug with the Poetry plugin.
  • Shows better errors when a user script fails

Full Changelog

  • [errors] Show better errors when user script errors out and fix poetry plugin by @mikeland73 in #1511
  • impl: set SHELL environment variable by @gcurtis in #1512
  • [fish] do not print hash -r in shellenv by @savil in #1516
  • all: (mostly) automated clean up by @gcurtis in #1513
  • [remove nixpkgs] enable feature for next release by @savil in #1517

Full Changelog: 0.5.14...0.6.0

Don't miss a new devbox release

NewReleases is sending notifications on new releases.