~ruther/verilog-riscv-semestral-project

ref: 34b74f067674498d19ea3797dfaa3330ce1514f0 verilog-riscv-semestral-project/flake.nix -rwxr-xr-x 1.3 KiB
34b74f06 — Rutherther tests: add python test environment for custom tests 1 year, 5 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
48
49
{
  description = "PAP verilog environment";

  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/release-23.05";
    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";
            };
            verilog-toolchain = with pkgs; symlinkJoin {
              name = "verilog-toolchain";
              meta.mainProgram = "verilog";
              paths = [
                verilog
                verilator
                gtkwave
              ];
            };
        in rec {

          packages.verilog = verilog-toolchain;
          packages.verilog-lsp = pkgs.svls;
          packages.default = packages.verilog;

          devShells.default = pkgs.mkShell {
            name = "pap-verilog";

            packages = with pkgs; [
              riscPkgs.buildPackages.binutils
              riscPkgs.buildPackages.gcc

              packages.verilog
              # lsp
              packages.verilog-lsp
            ];
          };
        }
      );
}
Do not follow this link