2.6k
Connect
  • GitHub
  • Mastodon
  • Twitter
  • Slack
  • Linkedin

Blog

Release: Flox 1.3.4

Flox Team | 12 November 2024
Release: Flox 1.3.4

If you just want the facts and don't have time to read the release notes, here is what you need to know about the new release:

⚠️ You will need to terminate all activated Flox sessions that have running services before you upgrade to this version.

🟢 We've dropped support for v0 manifests. There are very few left in the world and we auto-migrate them to v1, so things should be fine. If not, please shout in our community slack.

🟢 We've added a new --mode flag for flox activate. You can use flox activate --mode with the dev or run options; dev is the default, setting up libraries and dependencies for building software, while run provides a lightweight environment ideal for running software.

🟢 If you're using the default environment (found in $HOME), your prompt will no longer change when you activate it. You can restore the previous behavior by using flox config --set-bool hide_default_prompt false. We implemented this change to make the default environment feel more like that of conventional package managers.

OK, now that the important disclaimers are out of the way, what’s new with Flox?

Default Environment improvements

Users told us they found manually activating their default Flox environment—the one that lives in $HOME—counterintuitive and inconsistent with their expectations of how a default environment should behave.

We introduced new behavior to address this:

  • If you haven't created a default environment, running flox install outside any Flox environment (activated or not) will trigger a wizard that guides you through creating one. This behavior is intended to simplify onboarding for new Flox users;

  • The wizard will ask if you want to add a shell initialization hook (eval "$(flox activate -d ~ -m run)") to your shell’s rc file, enabling auto-activation of your default environment.

Both of these actions will occur just once: the first time you’re in this situation.

Containerize

The flox containerize command includes a few minor improvements.

First, the images it exports no longer use the Unix epoch as the timestamp. Instead, they use the actual export time. This makes it easier to identify images when you're using commands like docker images or podman images.

Second, flox containerize now attempts to load the exported image into docker or podman if either is available in your $PATH. Previously, this command only outputted a tarball of the image to the local directory. The option to export the file and not load it is still available via the -f option, i.e., flox containerize -f.

Activation Improvements

We made several improvements to the flox activate command and the activation process as a whole:

  • Each environment's hook.on-activate logic runs only during its first activation in a session. Subsequent activations of the same environment within the same session will reapply environment variables but will not re-run the hook.

  • On upgrades, the Flox installer now automatically detects and performs an environment rebuild if necessary. Previously this required manually initiating a rebuild.

  • The flox activate command now supports a --mode flag to select between dev and run modes. dev mode is the default behavior, appropriate for building software. It sets LD_AUDIT, LIBRARY_PATH, and other environment variables so builds can detect and link against dependencies at runtime. run mode performs a minimal activation for running software. It modifies the variables PATH (for executables) and MANPAGE (for man pages), but doesn’t set LD_AUDIT or similar variables for detecting and linking to libraries.

  • The flox activate command now conditionally prepends the variable JUPYTER_PATH. This makes it easier for Jupyter—software for running interactive notebooks—to discover compatible extensions installed by other Flox packages. Note: Taking advantage of this requires installing or updating to the latest version of the Flox Catalog's Jupyter package, released within the last month or so.

  • This release fixes miscellaneous performance issues affecting in-place activations.

We’re pretty excited about this release. Give it a try!

Full release notes are also available.