Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
99 changes: 84 additions & 15 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
inputs.uv2nix.follows = "uv2nix";
inputs.nixpkgs.follows = "nixpkgs";
};

lowrisc-nix.url = "github:lowRISC/lowrisc-nix";
};

outputs = {
Expand All @@ -35,6 +37,7 @@
uv2nix,
pyproject-nix,
pyproject-build-systems,
lowrisc-nix,
...
}:
flake-utils.lib.eachDefaultSystem (system: let
Expand Down Expand Up @@ -126,6 +129,11 @@
};

devShells = {
# Lightweight Python dev shell. This is the direnv-loaded default
# (`use flake` in .envrc): direnv sources a shell's environment into the
# current shell, so it must be a plain mkShell — the FHS EDA shell below
# cannot be sourced (it execs into a bubblewrap mount namespace), which
# is why it is a *separate* shell entered explicitly with `nix develop`.
default = pkgs.mkShell {
packages = [
python
Expand All @@ -151,6 +159,21 @@
export LD_LIBRARY_PATH="${lib.makeLibraryPath [pkgs.stdenv.cc.cc.lib pkgs.zlib]}''${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
'';
};

# EDA tool shell driven by lowrisc-nix's generic mkEdaShell. Enter with
# `nix develop .#eda` (it execs into a hermetic FHS sandbox, so it is not
# direnv-loadable). Tool paths/licenses come at runtime from the JSON
# file named by $LOWRISC_EDA_CONFIG; without it the shell still works and
# just warns. Bundles the dvsim virtualenv so dvsim can drive the tools.
eda = lowrisc-nix.lib.mkEdaShell {
inherit pkgs;
name = "dvsim-eda";
tools = {
cadence.xcelium = "23.09.002";
synopsys.vcs = "X-2025.06-SP2-1";
};
extraDeps = [self.packages.${system}.default];
};
};

checks = {inherit (pythonSet.dvsim.passthru.tests) pytest;};
Expand Down
Loading