-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathflake.nix
More file actions
75 lines (66 loc) · 1.66 KB
/
Copy pathflake.nix
File metadata and controls
75 lines (66 loc) · 1.66 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
{
description = "RISC-V VHDL Development Environment";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
riscv-toolchains.url = "github:ethycS0/nix-riscv-toolchains";
};
outputs =
{
self,
nixpkgs,
flake-utils,
riscv-toolchains,
}:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
toolchain = riscv-toolchains.packages.${system}.rv32i-cfi;
commonPackages = with pkgs; [
# Languages
python312
python312Packages.pyserial
python312Packages.websockets
nodejs_24
# Language Servers
vhdl-ls
asm-lsp
# Compilation & Simulation
ghdl
gtkwave
# Synthesis & Implementation
(pkgs.yosys.withPlugins [ pkgs.yosys-ghdl ])
nextpnr
python312Packages.apycula
openfpgaloader
# Verification & Compliance
python312Packages.riscof
python312Packages.distutils
sail-riscv
spike
dtc
# Documentation
texliveFull
doxygen
# Build Tools
clang
gnumake
bear
flex
# Serial Interface
screen
xxd
];
in
{
devShells.default = pkgs.mkShell {
packages = commonPackages ++ [ toolchain ];
env = toolchain.envVars;
shellHook = ''
export NIX_YOSYS_PLUGIN_DIRS="${pkgs.yosys-ghdl}/share/yosys/plugins"
'';
};
}
);
}