# Copyright lowRISC contributors (OpenTitan project).
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0

# Activate the default devShell
use flake

# Create the venv if it doesn't yet exist, and update the project's environment
# with all useful dependencies that can be run under the nix environment
[[ -d ".venv" ]] || (uv venv && uv sync --extra=nix)

# Activate the project venv
. .venv/bin/activate

# Tell UV to use the venv python, without this it will use system python on
# NixOS. Which means `uv pip list` will not work.
export UV_PYTHON=.venv/bin/python
