Skip to content

Commit 9d2bc78

Browse files
authored
[setup] check for OMICRON_USE_FLAKE=1 in Nix path (#6917)
I have nix installed but don't have it enabled for omicron for reasons. I was setting up a new distrobox container for development and noticed that these packages weren't being installed because of that.
1 parent ca63e9f commit 9d2bc78

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tools/install_builder_prerequisites.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,8 @@ function install_packages {
116116
if [[ "${HOST_OS}" == "Linux" ]]; then
117117
# If Nix is in use, we don't need to install any packagess here,
118118
# as they're provided by the Nix flake.
119-
if nix flake show &> /dev/null; then
119+
if [[ "${OMICRON_USE_FLAKE-}" = 1 ]] && nix flake show &> /dev/null; then
120+
echo "OMICRON_USE_FLAKE=1 in environment and nix detected in PATH, skipping package installation"
120121
return
121122
fi
122123

0 commit comments

Comments
 (0)