-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshell.nix
More file actions
32 lines (31 loc) · 954 Bytes
/
shell.nix
File metadata and controls
32 lines (31 loc) · 954 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
{
pkgs ? import (fetchTarball "https://nixos.org/channels/nixos-25.11/nixexprs.tar.xz") { },
}:
let
# Append overlays after nixpkgs import to avoid issues with multi-file interactions
pkgsOverlay = pkgs.appendOverlays [
# rust-overlay for Rust toolchain management
(import (fetchTarball "https://github.com/oxalica/rust-overlay/archive/master.tar.gz"))
];
# Use mill 0.11.12 instead of the latest version with breaking changes
mill_0_11 = pkgsOverlay.callPackage ./nix/mill-0.11.12.nix { };
rustToolchain = pkgsOverlay.rust-bin.fromRustupToolchainFile ./sim/rust/rust-toolchain.toml;
npc = pkgsOverlay.callPackage ./default.nix { inherit mill_0_11; };
in
pkgsOverlay.mkShell rec {
name = "npc-env";
inputsFrom = [ npc ];
packages = with pkgsOverlay; [
rustToolchain
metals
scalafmt
sbt
gtkwave
surfer
ieda
];
shellHook = ''
export NPC_HOME=${NPC_HOME}
'';
NPC_HOME = toString ./.;
}