Releases: flox/flox
v1.9.1
Changes
- Using
exitorexecinhook.on-activatenow returns an error. Previously these would have exited the activation prematurely.
Fixes
flox containerizeon macOS now works correctly with packages from FloxHub custom catalogs (fixes #3971)flox activateno longer triggers interactivermprompts when the user hasalias rm='rm -i'in their shell configuration (fixes #3984)- Running
flox activatewithenv -inow works again, fixing a regression that was introduced in v1.9.0. - Error messages are now correctly displayed when a package cannot be installed, fixing a regression that was introduced in v1.8.3.
- Improved the error messaging when a package cannot be installed due to incorrect public key configuration.
- Error reporting is now enabled for the
executivebackground process to improve reliability.
Download Links
v1.9.0
Changes to flox activate
TLDR
The activation subsystem was rewritten from Bash to Rust, and process parentage was reworked to allow automated invocations of Flox (such as third-party service managers) to track processes. There are a few breaking changes to make note of, as well as a number of performance improvements and a few outstanding bug fixes.
- [breaking change] It is recommended to exit all current activations or reboot after installing, especially if you are using Flox services.
- [breaking change]
flox activate -- <command>will nowexec()the provided command without invoking your user shell or profile scripts, which is both more efficient and maintains the same PID throughout. - A new
flox activate -c "<command_script>"feature has been added which provides the previous semantics of--. This can be used to run scripts in your default shell whereflox activate -- <shell> -c "<command_script>"might have previously been used.
Additional changes to activate
- The core of activation has been rewritten from Bash to Rust which has reduced the startup latency for activations, in addition to improving reliability and testability.
flox activatenow maintains the same PID all the way through to the command or interactive shell that you execute which makes it possible for automated invocations of Flox (such as third-party service managers) to track the process.- Activation hooks will now re-run whenever the modification of an environment is activated, even if it has been activated previously. Concurrent activations of modified environments will block on each other with a warning to prevent conflicts between concurrent runs of the activation hooks.
- Concurrent activations of an environment in different modes (e.g.
runanddev) are now prevented. If you find yourself accidentally using the wrong mode then setoptions.activate.modein the environment manifest. This avoids a bug where exiting an activation in one mode could stop services even when an activation in a different mode is still running (#2357). flox-activations executivereplacesflox-watchdog, which is responsible for tracking state for activations. Only one instance of the process will be started for all activations of an environment, it’s now more efficient at tracking attachments to an activation, and more reliable at recovering from failures
Services
- Services and their child processes are now parented to
flox-activations executivewhich makes them easier to identify in process listings. Linux platforms additionally enable a sub-reaper to ensure that zombie processes get parented and reaped by theexecutive. - Services are no longer restarted from scratch when there are no modifications to the environment, which speeds up some uses of
flox services startandflox services restart. - Impure environment variables (not set in your manifest) will no longer leak into services in subsequent
flox services start,flox services restart, andflox activate -sinvocations. - A warning will be return if
flox services startorflox services restartare called fromhook.on-activatein order to prevent deadlocks. If you want to start services with an activation thenflox activate -sshould be used.
Other features and fixes
flox initdetects.node-versionfiles in addition to.nvmrcfor Node.js version detection.flox initprefers LTS (even-numbered) Node.js versions when auto-detecting which package to install.- Commands without explicit
--diror--remoteflags no longer error when they detect an active FloxHub environment. - Expired FloxHub tokens are no longer automatically deleted, so activating environments under your handle no longer triggers a "do you want to trust this environment?" prompt after expiry, and a persistent reminder to re-authenticate is shown instead.
Download Links
v1.8.4
Notable features and fixes
This release contains a hotfix fixing installations on Linux that have a pre-existing Nix installation. Failure logs would include:
++ diskutil info -plist /nix
/usr/share/flox/include/after-install.bash: line 184: diskutil: command not found
++ plutil -extract VolumeUUID raw -
/usr/share/flox/include/after-install.bash: line 184: plutil: command not found
Download Links
v1.8.3
This release addresses several bugs and adds new improvements, including:
Improvements
- LaunchDaemons on macOS are now signed and are associated with Flox in System Preferences. Items no longer show up as "sh - Item from unidentified developer."
- Environments can now be initialized directly on FloxHub using
flox init --reference <owner/name>. - First-time users of
flox installare guided to fetch or create their FloxHub-based default environment. - Packages are downloaded in parallel when building environments, with the maximum number of concurrent downloads configurable via
FLOX_MAX_PARALLEL_DOWNLOADS. - Running
flox list -anow displays installed outputs for each package. - Activation messages now explicitly indicate whether the environment is ahead of, behind, or diverged from the upstream FloxHub state with specific action suggestions.
- Icons used in CLI output have been updated to use unicode characters instead of emojis.
Fixes
- Running
flox installduring onboarding now correctly reuses existing FloxHub default environments instead of failing. - Error messages when attempting to rename a FloxHub environment now provide the FloxHub URL and next steps.
- Running
flox pullno longer signals divergence when the local environment is exclusively ahead of the remote state.
Download Links
v1.8.2
Features
- The manifest now accepts
referenceas an alias forremoteininclude.environments[]when including other environments.
Fixes
- FloxHub environments no longer trigger unnecessary relocking delays when first opened.
flox activateno longer modifies lockfiles when the only differences are formatting changes.- FloxHub environment detection now provides clearer error handling when environment references cannot be resolved.
Download Links
v1.8.1
Features
- Running
flox pullwithout arguments in an activation now pulls the last activated environment. If there's an environment in the current directory,flox pullwill prompt flox shownow displays additional package metadata including catalog, license, outputs (with default install markers), supported systems, source URL, and publication date- JAVA_HOME is now set for environments that contain
bin/java
Fixes
- Fixed a bug where
flox buildwould fail when running a "pure" sandbox build that created outputs containing directories with mode 555 flox activate --trustnow propagates trust to the includes of remote environments
Download Links
v1.8.0
Changes for using FloxHub environments
Environments on FloxHub could previously be referred to using -r | --remote <owner/name>, but using environments with --remote was often too slow due to the fact that it always required a network call.
--remote is being deprecated, and a new option -r | --reference <owner/name> is being introduced to allow using FloxHub environments without a network call or having to manually run a flox pull. When the first command using --reference is used, the environment will be fetched from FloxHub and cached locally. We'll refer to that copy of the environment as the local FloxHub environment, and the copy on FloxHub as the upstream FloxHub environment.
Subsequent commands using --reference will use the local FloxHub environment, which means that for example repeat activations of flox activate -r owner/name will be much faster without requiring network access.
If changes are made to the local FloxHub environment (e.g. using flox edit -r owner/name), those changes can be pushed to FloxHub with flox push --reference owner/name. To get the latest upstream changes before activating, run flox pull -r owner/name before flox activate -r owner/name.
Previously flox pull --remote owner/name would create a .flox directory in the current directory. Using the new option flox pull --reference owner/name now instead updates the local FloxHub environment. To pull an environment and create a .flox directory, use flox pull owner/name without --reference.
Other features and fixes
- Added a
--labeloption toflox containerizefor specifying custom OCI image labels on both Linux and macOS. Labels are applied to the generated container image on both Linux and macOS. Labels specified with--labelare merged with any labels defined in the environment's[containerize.config]section in the manifest# Single label flox containerize --label app=myapp # Multiple labels flox containerize --label app=myapp --label version=1.0 --label env=production - Fixed a bug where metrics buffer would grow indefinitely, causing continual network traffic. Thanks to @HuaDeity
Download Links
v1.7.8
Fixes
This release fixes a bug where programs would fail with Cannot allocate memory in static TLS block due to new nixpkgs PIE defaults. This fixes issues with rustfmt on aarch64-linux and improves overall stability of dev-mode activations.
Download Links
v1.7.7
Notable features and fixes
This release addresses several bugs and adds new improvements, including:
- Leading slashes are now removed from install IDs generated by
flox installso that the fullpkg-path(including custom catalog names) don't clutter the manifest. The fullpkg-pathis still shown byflox list. - Changes to Flakes are now correctly applied when using
flox installandflox upgrade. - Disabled
.envsupport in services (process-compose) so that environment variables defined in[vars]and[services.*.vars]aren't shadowed. Users can still source.envfiles fromhook.on-activatefor the correct precedence. Thanks to @ryansch for the report and diagnosis. - Fixed an issue where
flox pushincorrectly reported that the environment had been published when no changes were present. Thanks to @fleat for the report.
Maintenance
- Nix has been upgraded internally from 2.28.4 to 2.31.2
- process-compose has been upgraded internally from 1.73.0 to 1.75.2
Download Links
v1.7.6
Notable features and fixes
This release addresses several bugs and adds new improvements, including:
- Added
flox auth tokencommand to display your current floxhub token (useful for automation) - Don't print upgrade notification when running
flox activate -- <cmd> - Add
flox pull --copy --generationoption to pull-copy a specific generation from an environment hosted on https://hub.flox.dev - Fixed garbling of escape codes in bare
floxcommand output - The latest stable release of Flox is now tracked by the
flox/flox:latestbranch (formally a tag). This is because tags have a bit more permanence and a branch is expected to move over time. This is primarily useful for flake-based installations.
Thank you to our community contributions this release
- Better error handling in
flox pushwhen no changes are present (@mrswastik-robot) - Added trailing newlines in manifest and lockfile (@mrswastik-robot)
- Nicer alignment in
flox showoutput (@mrswastik-robot) flox listnow includes the catalog in the package path (@mrswastik-robot)