~ruther/verilog-riscv-semestral-project

verilog-riscv-semestral-project/flake.nix -rw-r--r-- 1.1 KiB
79c7be5c — Rutherther chore: remove unnecessary executable flags 1 year, 3 months ago
                                                                                
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
{
  description = "Verilog, RISC-V, Python environment";

  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
    flake-utils.url = "github:numtide/flake-utils";
  };

  outputs = { self, flake-utils, nixpkgs }: let
  in flake-utils.lib.eachDefaultSystem
      (system:
        let pkgs = import nixpkgs {
              inherit system;
              config.allowUnfree = true;
            };
            riscPkgs = import nixpkgs {
              inherit system;
              crossSystem.config = "riscv32-none-elf";
            };
        in rec {
          devShells.default = pkgs.mkShell {
            name = "riscv-sv-processor-toolchain";

            packages = [
              # verilog simulation
              pkgs.verilog
              pkgs.verilator

              # wave viewer
              pkgs.gtkwave

              # riscv toolchain
              # building c, assembly
              riscPkgs.buildPackages.binutils
              riscPkgs.buildPackages.gcc

              # for testing
              pkgs.python3

              # lsp
              pkgs.svls
              pkgs.pyright
            ];
          };
        }
      );
}
Do not follow this link